Solved

Transformation of stored procedures to web services?

Posted on 2004-04-15
4
211 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

816 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now