> The 'add web reference' wizard works in this case when the objects do
> not contain complex data types.  I have tested with success this
> approach, my understanding is that it is simply a remoted 
> object using a
> SOAP formatter, which is essentially what a web service is, RMI calls
> returning SOAP.

My point was that the add web reference wizard is not intended to be used with
remoting endpoints.  So any success you have with it is just a case of you
getting lucky.  And by extension, and problems you have when you attempt to use
the tool in a manner it's not designed to support, you're going to be on your
own.

> As for SoapSuds.exe, I have no idea
> what that is so ill do some reading :)
> 
> Oh, on a side note.  I am not using wsdl.exe to generate the 
> wsdl.  The
> wsdl is found in client projects WebReferences sub folder.  I assumed
> the remoted object is returning the wsdl when I specify the wsdl query
> string attribute on the link below.
> http://<your_ip_address>:1234/GreetingManager.soap?wsdl
> 

When you use the add web reference wizard, you are indirectly using wsdl.exe.
You can use it from the command line as well.  It's a program that's designed to
take either a dll name or endpoint url as input *that refers to an xml web
service* and produce client-side proxying code and/or wsdl as output.  Think of
the add web reference wizard as just being a fancy way to run wsdl.exe w/o using
the command line yourself.

Soapsuds.exe is the counterpart to wsdl.exe for the remoting world.  It takes an
assembly name or endpoint url as input and also generates client-side proxying
code as output; but it assumes it's talking to a remoting endpoint.

The 10k summary is that xml web services and remoting take different approaches
to soap (document/literal for web services, rpc/encoded for remoting) and which
type system governs their operations & parameters (xml schema for web services,
clr type system for remoting).  Each client-side tool (wsdl.exe and
soapsuds.exe) are then built to recognizing & deal with the types of wsdl being
returned by their corresponding servers.

So when you point wsdl.exe (add web reference) to a remoting endpoint, things
don't work very well due to the giant mismatched understanding each side is
operating on (wsdl.exe thinks its talking to a document/literal, schema driven
web service, but in fact is talking to an rpc/encoded, clr type system driven
remoting endpoint).  And it just won't work for anything other than the most
trivial (i.e., useless) scenario.

You can do what you want with remoting, there's just no wizard you can use in
VS.NET to get the job done.  Start with reading up on soapsuds.exe, but there
are a number of other approaches possible as well when it comes to generating
client-side metadata.  A book like "Advanced .NET Remoting" by Ingo Rammer would
enumerate those approaches for you.

-Mike
DevelopMentor
http://staff.develop.com/woodring
 

Reply via email to