Solved

Transformation of stored procedures to web services?

Posted on 2004-04-15
4
203 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
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 properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

728 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

10 Experts available now in Live!

Get 1:1 Help Now