Using Parameter-based Web Services

Discussion in 'ASP .Net Web Services' started by Duncan Sutherland, Oct 13, 2003.

  1. 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!
    Duncan Sutherland, Oct 13, 2003
    #1
    1. Advertising

  2. 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/quickstart/util/srcview.aspx?path=/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" <>
    >Sender: "Duncan Sutherland" <>
    >Subject: Using Parameter-based Web Services
    >Date: Mon, 13 Oct 2003 06:51:51 -0700
    >Lines: 28
    >Message-ID: <133801c39191$2742f1d0$>
    >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.webservices
    >Path: cpmsftngxa06.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:19878
    >NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >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!
    >
    >
    >
    >
    >
    Ed Smith[msft], Oct 13, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick
    Replies:
    1
    Views:
    6,123
    Alvin Bruney - ASP.NET MVP
    Sep 12, 2005
  2. Anup
    Replies:
    1
    Views:
    2,779
    Mark Rae
    May 9, 2006
  3. imlakhani

    Web Services Restful Services

    imlakhani, Dec 16, 2009, in forum: Java
    Replies:
    1
    Views:
    419
    Jeffrey H. Coffield
    Dec 16, 2009
  4. Sasson Havusha

    Using .NET web services proxy with Java based server

    Sasson Havusha, Sep 21, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    203
    Sasson Havusha
    Sep 22, 2003
  5. John
    Replies:
    4
    Views:
    443
Loading...

Share This Page