Referencing web service complex data type within a second web service (like a delegate)

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Referencing web service complex data type within a second web service (like a delegate)

    Hi,
    I am trying to figure out if ASP.NET XML Web Services and the WSDL
    standard can handle this type of scenario:

    I have two web services, and one consumer client application. Lets
    call web service 1 "basews", and web service 2 "custom", and the
    client app "client".

    I want basews to define a delegate of sorts (where the delegate
    signature contains complex data types as arguments and return types),
    and then custom ws would conform to the basews delegate signatures, so
    that within client, I can call them similar to how delegates actually
    work in .NET (with the obvious overhead of SOAP, etc).


    If basews has the following pseudo-structure (VB'ish) :

    -----------------
    Class basews
    <WebMethod()> Public Function getComplexDataType(byval req as
    MyRequest) as MyDataType
    ...
    End Class

    Public Class MyDataType
    Public field as String
    ...
    End Class

    Public class MyRequest
    Public field as Integer
    ...
    End Class
    -----------------

    where MyDataType and MyRequest (really can be more complex) are added
    to basews WSDL automatically by .NET.


    Can I create "custom" ws like this:

    -----------------
    Class custom
    <WebMethod()> Public Function customGetComplexDataType(byval req as
    basews.MyRequest) as basews.MyDataType
    ...
    End Class
    -----------------


    such that within "client", it treats the return type of both web
    service's methods as the same type? Or if this is not possible, is
    there a way of at least being able to treat
    basews.MyDataType/MyRequest and custom.MyDataType/MyRequest the same
    so that I only have to write one routine to populate/read MyDataType
    and MyRequest within "client"?

    This is going to be used with dynamic web service binding techniques
    so that I can take an arbitrary WSDL and method names that conform to
    certain signatures (like delegates) and be able to call them
    appropriately.

    Thanks for the replies. Also, if you could copy me at 'mdearman
    NOSPAM at libera.com' I would be grateful so I don't accidently miss
    any replies.
    Mike Dearman Guest

  2. Similar Questions and Discussions

    1. using Web Service with Complex-Type in WSDL
      I have a web service developed in BEA WebLogic that I am trying to call. The WSDL has two complex types in it and is of type document/literal. When...
    2. Consuming Web Service that returns a Complex Data Type
      All, I'm trying to consume a web service that returns a complex data type. I'm not having any luck. Hoping someone can point me in the right...
    3. creating web service with complex data types
      I am trying to create a web service that contains a function that should take an array of complex types. The function within the cfc that gets...
    4. Referencing web service
      Hi I have just uploaded my first web service to a remote host. So I am very new to this. I am now trying to reference the ws by putting the ws...
    5. Problem referencing web service
      Hi I am trying to get web reference to my first (!) web service which is on a remote host. I am getting the following error; Server Error in...
  3. #2

    Default Re: Referencing web service complex data type within a second web service (like a delegate)

    OK, I found an article in MSDN discussing how to "share types" between
    web services by manually modifying the ASP.NET web service
    Reference.vb. However, this is not very flexible, as it really
    hinders updating any web references without manual editing. Our
    customers will not want to do this manually.

    Does anyone know of any tools or features of VS.NET 2003 to help with
    this problem? Or anyone willing to share experiences of using this
    approach?

    Thanks,
    Mike


    [email]dearman@cse.buffalo.edu[/email] (Mike Dearman) wrote in message news:<ac5cc9a8.0406210913.148eb98@posting.google.c om>...
    > Hi,
    > I am trying to figure out if ASP.NET XML Web Services and the WSDL
    > standard can handle this type of scenario:
    >
    > I have two web services, and one consumer client application. Lets
    > call web service 1 "basews", and web service 2 "custom", and the
    > client app "client".
    >
    > I want basews to define a delegate of sorts (where the delegate
    > signature contains complex data types as arguments and return types),
    > and then custom ws would conform to the basews delegate signatures, so
    > that within client, I can call them similar to how delegates actually
    > work in .NET (with the obvious overhead of SOAP, etc).
    >
    >
    > If basews has the following pseudo-structure (VB'ish) :
    >
    > -----------------
    > Class basews
    > <WebMethod()> Public Function getComplexDataType(byval req as
    > MyRequest) as MyDataType
    > ...
    > End Class
    >
    > Public Class MyDataType
    > Public field as String
    > ...
    > End Class
    >
    > Public class MyRequest
    > Public field as Integer
    > ...
    > End Class
    > -----------------
    >
    > where MyDataType and MyRequest (really can be more complex) are added
    > to basews WSDL automatically by .NET.
    >
    >
    > Can I create "custom" ws like this:
    >
    > -----------------
    > Class custom
    > <WebMethod()> Public Function customGetComplexDataType(byval req as
    > basews.MyRequest) as basews.MyDataType
    > ...
    > End Class
    > -----------------
    >
    >
    > such that within "client", it treats the return type of both web
    > service's methods as the same type? Or if this is not possible, is
    > there a way of at least being able to treat
    > basews.MyDataType/MyRequest and custom.MyDataType/MyRequest the same
    > so that I only have to write one routine to populate/read MyDataType
    > and MyRequest within "client"?
    >
    > This is going to be used with dynamic web service binding techniques
    > so that I can take an arbitrary WSDL and method names that conform to
    > certain signatures (like delegates) and be able to call them
    > appropriately.
    >
    > Thanks for the replies. Also, if you could copy me at 'mdearman
    > NOSPAM at libera.com' I would be grateful so I don't accidently miss
    > any replies.
    Mike Dearman Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139