Solved

Transformation of stored procedures to web services?

Posted on 2004-04-15
4
221 Views
Last Modified: 2010-04-07
Now: 1500 well structured stored procedures (T-SQL), each with an external interface consisting of X in parameters and Y result sets.

Tomorrow: 1500 web services based on current T-SQL code.

What is the easiest way to acomplish this transformation if you don't want to rewrite most of the code?

0
Comment
Question by:OrjanFranzen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:pcazella
ID: 10833633
Using ASP.net, you can define a dataset to return which, when called via SOAP, is an XML stream.
Create a .net page with a <web method> funciton and save it witha .asmx extention.  One of the nice features of using .net for the web services is you can auto-generate the WSDL just by typing "?WSD"L to the end of the url.
Example: HelloWorld.asmx?WSDL

Also note that you can group your stored procedures in "Classes" or collections all on one .asmx

http://www.asp.net/Tutorials/quickstart.aspx

<%@ WebService Language="VB" Class="spCollection" %>
Imports System
Imports System.Web.Services

Public Class HelloWorld :Inherits WebService

     <WebMethod()> Public Function sp_TSQL1(Param1) As Dataset
          'SQL Select statments to return a recordset
          return(DS)
     End Function

   <WebMethod()> Public Function Add(a As Integer, b As Integer) As Integer
       Return(a + b)
   End Function

End Class


Consuming an XML stream in an interface layer is a different topic, here I'm only talking about creating the web service.  I like to use Flash as a GUI, so web services are everything to me.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 125 total points
ID: 10969418
OrjanFranzen,

Has your question been answered.  Please either accept a comment as the answer, or post a comment to to indicate what additional information is required.

COBOLdinosaur
Page Editor, Web Development Software
0
 

Expert Comment

by:raylewallen
ID: 11221742
I'm curious as to why you would take 1500 well structured sps and convert them into something less efficient?  Your not going to take the sql code and move it to something inline in VB are you?  If that is the case, your solution is to not do it all.  Perhaps I am misunderstanding your intentions though.
0
 

Author Comment

by:OrjanFranzen
ID: 11233947
Agree, that it might sound stupid.

The intention is to use an existing C/S application with sps. The application is logically structured as a 3-tier with a thin client, external sps and internal sps. The external sps that handles business logic has a "client" interface with parameters, result sets and error passing. The internal sps handles database access and are called from the external sps.

It would by nice if we could build a webb interface upon the existing external sps.

If it's possible to call these sps from webb services we could keep the code "as is" and also gain performance. Maybe the problem is how to call sps from a webb service???


0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question