Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Using Parameter-based Web Services

Reply
Thread Tools

Using Parameter-based Web Services

 
 
Duncan Sutherland
Guest
Posts: n/a
 
      10-13-2003
Assume a simple 3-tier distributed application: SQL back-
end, a web service (ws) running on IIS, and a Windows
Form client. Assume a simple ws that does a parameter-
driven query of the SQL database. I have been scouring
the various MSFT sites and can't find an answer to two
very basic questions:

1. I assume the ws method that extracts the data from the
SQL database needs to include the relevant parameter(s);
and

2. How is/are the parameter(s) passed to the ws method?

Microsoft sample code looks like this for a non-
parameterized situation:

Dim ws As New AuthorsWinClient.localhost.AuthorsService
....credentials stuff...
AuthorsData.Merge(ws.GetAuthors())

This works fine but I am not clear how to do this when
one or more parameters are involved?

Thanks for any guidance/assistance!




 
Reply With Quote
 
 
 
 
Ed Smith[msft]
Guest
Posts: n/a
 
      10-13-2003
When defining the service, just define a parameter the same way you would
if it were a regular function.
They when the proxy class is created, you can pass it the argument.


This example has a web method that takes a string.
http://samples.gotdotnet.com/quickst...=/quickstart/a
spplus/samples/services/DataTypes/DataTypes.src&file=VB\DataTypes.asmx&font=
3

Hope this helps;
-Ed Smith
VB QA Team

--------------------
>Content-Class: urn:content-classes:message
>From: "Duncan Sutherland" <(E-Mail Removed)>
>Sender: "Duncan Sutherland" <(E-Mail Removed)>
>Subject: Using Parameter-based Web Services
>Date: Mon, 13 Oct 2003 06:51:51 -0700
>Lines: 28
>Message-ID: <133801c39191$2742f1d0$(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcORkSdCPjB7xBmITcaDjYPSs0yEOQ==
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:19878
>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Assume a simple 3-tier distributed application: SQL back-
>end, a web service (ws) running on IIS, and a Windows
>Form client. Assume a simple ws that does a parameter-
>driven query of the SQL database. I have been scouring
>the various MSFT sites and can't find an answer to two
>very basic questions:
>
>1. I assume the ws method that extracts the data from the
>SQL database needs to include the relevant parameter(s);
>and
>
>2. How is/are the parameter(s) passed to the ws method?
>
>Microsoft sample code looks like this for a non-
>parameterized situation:
>
>Dim ws As New AuthorsWinClient.localhost.AuthorsService
>...credentials stuff...
>AuthorsData.Merge(ws.GetAuthors())
>
>This works fine but I am not clear how to do this when
>one or more parameters are involved?
>
>Thanks for any guidance/assistance!
>
>
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Services Restful Services imlakhani Java 1 12-16-2009 03:06 PM
Start Web services as Windows Services start Anup ASP .Net 1 05-09-2006 11:44 AM
How .NET web services client handles exceptions from Java web services? John ASP .Net Web Services 4 03-31-2006 10:13 PM
What is the difference between C# windows Services and web services in vs.net? Nick ASP .Net 1 09-12-2005 02:33 PM
how to implement Services Interface Tier (web services) Szymi MCSD 0 11-03-2003 10:50 AM



Advertisments