Multiple web service references sharing types


To share types between more web service references, generate proxy classes manual with the wsdl.exe (for example in a Visual Studio command prompt) like this:

wsdl /sharetypes WebServiceURL1 WebServiceURL2 ... WebServiceURLn
/o:OutputFileName.cs /n:NamespaceName

Just add this .cs file to your project and use the generated namespace's classes, you should't add any web reference. The types which are the same on more web services will be generated only once to a common namespace. This is very useful, because you needn't copy a lot of properties...

Posted on 22:05 by csharper and filed under , , , , , | 1 Comments »

1 comments:

Unknown said... @ 7 October 2013 at 07:03

Hi, To create practical robust content templates in Web Design Cochin, and develop task and work flows. This ensures that not only is the website an easy and enjoyable experience for users,Thanks..........

Post a Comment