How to define paramter-types for WebMethods AND Client?

Discussion in 'ASP .Net Web Services' started by Daniel Barisch, Aug 22, 2003.

  1. How to define a class within an external DLL, that can be used as parameter
    for a WebMethod and in Client-Projects?

    I mean:

    <WebService()>
    public Class WServer
    <WebMethod()>_
    Public Function getXYZ(myDataSet as System.DataDataSet) as xyz...
    ....
    end class

    = Client =
    ....
    dim ws as new WebServiceProxy.WServer
    dim ds as new System.Data.DataSet
    dim rc as xyz
    rc = ws.getXYZ(ds)

    That works fine. But changing the type of "ds" to a class defined in an
    external DLL (reference in WebService- and client-project) the following
    happens ...

    <WebMethod()>_
    Public Function getXYZ(myClass As ExternalDLL.MyClass) as xyz ...

    dim ws as new WebServiceProxy.WServer
    dim ds as new ExterneDLL.MyClass
    dim rc as xyz
    rc = ws.getXYZ(ds)

    >> 'The Value of "ExternalDLL.MyClass" can't be converted to

    "WebServiceProxy.MyClass"!' (paramter "ds")

    How to get the client clear, that it is exactly the same class? Is there
    something special, I have to define in "ExternalDLL.MyClass"
    (serialisation)?

    Thanks D.Barisch
     
    Daniel Barisch, Aug 22, 2003
    #1
    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. Randy

    Grabbing paramter in the URL

    Randy, Feb 8, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    359
    Eliyahu Goldin
    Feb 8, 2005
  2. tshad
    Replies:
    5
    Views:
    535
    Steve C. Orr [MVP, MCSD]
    May 17, 2005
  3. Islamegy®

    SQL Output Paramter problem

    Islamegy®, Apr 16, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,224
  4. Ranginald
    Replies:
    2
    Views:
    586
    Ranginald
    May 3, 2006
  5. Jeffery Tyree
    Replies:
    2
    Views:
    258
    Jeffery Tyree
    Oct 17, 2005
Loading...

Share This Page