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

From: Mike Dearman (dearman_at_cse.buffalo.edu)
Date: 06/21/04


Date: 21 Jun 2004 10:13:07 -0700

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.



Relevant Pages

  • Re: web service question (weblogic / j2ee related)
    ... client would receive the response and manually parse the resulting HTML ... You should most definitely look up a web services guide or tutorial if you are going to work with it. ... the SOAP part of web services,. ... WSDL is the definition of the contract of the server which you give to the client so its WS tools can generate a proper SOAP stub for you. ...
    (comp.lang.java.programmer)
  • Re: Creating a Web Service (Service, not Client) from WSDL
    ... I don't think there is a tool to do it for you, although creating the client ... will help you rough in any objects you have to use and give you the method ... MapForce can also be used to create services from the WSDL. ... that the "normal way" in creating Web Services is: ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: WSDL Dime Attachment
    ... is being adopted going forward for web services. ... rudimentary support for MTOM in the latest web service extensions toolkit ... > was generated with a WSDL generator using the third party software form> systinet. ... My question is how do I implement the client using WSE 1 or 2? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Accessing a .NET 2 webservice from a .NET1 client
    ... Web services are made to be even not platform related - to not say language. ... What about the WSDL? ... local server. ... to wrap the service in a class that can be used by a .NET 1.1 client. ...
    (microsoft.public.dotnet.framework)
  • Re: How to return a user-defined data type object from a webservice?
    ... your client ... object coming from the server via the web service is in a different ... John Saunders | MVP - Windows Server System - Connected System Developer ... It's just not how Web Services works. ...
    (microsoft.public.dotnet.framework.webservices)

Loading