I am developing a project using Visual Studio 2010, and I need to consume a webservice. The problem is that the development machine does not have access to the webservice, so I cannot add a reference directly.
What I need is to include a stub in my project that is exactly the same structure like the webservice. Once I deploy the project on the live server I will then be able to simply change the URL in the web.config and point it to the real webservice.
How can I achieve this?
Get the webservice wsdl, then execute the Visual Studio command prompt and wsdl.exe description.wsdl
This generate a cs proxy file that you can add to your solution and use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With