I have a webservice on a remote host that I need to invoke from ASP.NET/C# class. What is the simplest way of calling a method via SOAP, given WSDL url and a method signature?
Given: WSDL url as string(available only at runtime, i.e. variable) Method signature(constant)
Need to: Create a soap client and perform method call.
The simplest thing to do is to just use "Add Service Reference" and point to the WSDL. It will generate the proxy classes for you, including a proxy method which should match the method signature you've been given.
See if you find How to Consume a Web Service to be helpful.
See here: http://msdn.microsoft.com/en-us/library/d9w023sx.aspx
Its very easy in visual studio - you simply add the web reference url and it generates the proxy stub for you.
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