I'm developing an application that needs to call some methods located inside a SOAP web service and read their responses. For security reasons my client does not allow me to access the service, so there's no way for me to reference it using the Visual Studio tool.

I do have a WSDL file, an interface with the methods I need to call and the web service address.

How can I call methods and get the responses without creating a reference to the web service inside Visual Studio?

Thank you all for the time and attention!

4 Years
Discussion Span
Last Post by mradzinski006

Using Add Service Reference... in the project's context menu, allows you to add a local WSDL file. Visual Studio can then generate the necessary classes, and you can specifiy the URL to use like so:

new MyServiceClient("config", "remoteAddress");

Where you would replace "config" and "remoteAddress" with the appropriate config and URL respectively (or specify the remote URL in the config).

Unless there's something I'm not getting about your question...

Votes + Comments
Correct answer
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.