SOAP calls to a server from a Windows Forms app

T

TC

Hello All,

I'm building a COM object using C# and I need to communicate with a server
via SOAP.

Unfortunately, all of the samples that I've seen target ASP.Net, config
files, etc.

Does anyone have a quick & dirty sample of how to make SOAP calls from
within a Windows Forms application using C#?

What assemblies need to be referenced?

Thanks & Regards,

TC
 
D

Danny T

TC said:
I'm building a COM object using C# and I need to communicate with a server
via SOAP.

Unfortunately, all of the samples that I've seen target ASP.Net, config
files, etc.

Does anyone have a quick & dirty sample of how to make SOAP calls from
within a Windows Forms application using C#?

What assemblies need to be referenced?

Thanks & Regards,

Not sure if you need a reference to System.Web, but everything's just
the same as for ASP.NET. Right-click on References and go to "Add Web
Reference" and type the address of your WSDL/asmx. Type a name for the
reference on the right (I usually use "Soap.ProductName"), then you're
good to go:

Soap.ProductName.ServiceName webServices = new
Soap.ProductName.ServiceName();

webServices.CallWebMethodHere("something", "somethingElse");
 

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