Creating an object from a wsdl definition?

S

sean.j.gage

Is there a way to get to a Type definition from a wsdl through c#
during runtime? I'd like to load and process the wsdl into its various
objects at run time and be able to use a factory to return the
appropriate type when that object is returned from a third party web
service. Ultimatly the client can't have a web reference to the web
service so I need a way to get the objects programmatically.

Cheers!
 
N

Nicholas Paldino [.NET/C# MVP]

I don't understand, why can't the client have a reference to the web
service? If you get the type definition at runtime, you wont know what to
do with it, since the operations and types involved are going to be known
only at runtime. Everything that you will have to do will be through
reflection (if you choose to compile types at runtime), or you will have to
craft the requests yourself.

You probably want to use the SoapHttpClientProtocol class if you are not
using WCF.

Hope this helps.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top