Reputation: 55
My company provides SOAP service over Https. I need to write a library that consumes that SOAP service using C#. I am using code generated by "Add Service Reference..." feature of Visual Studio 2008, but it creates a class for each function (there are many of them) exposed by service that i think overkill. My question is there another way to write a consumer without using "Add Service Reference..."?
Upvotes: 1
Views: 7545
Reputation: 1058
You can use svcutil.exe command line utility to create the proxy class for your service.Add that proxy class with generated config file in your project.All the service methods will be available through that class. Here are the steps for Generating proxy clas.
Open Visual Studio Command prompt.
Go to the specific Folder where you want to place you generated class.e.g type "cd D:\\Services
This command will generate the class for your service in "D:\\Services" folder with output.config file. you have to copy the client configration section from the output.config file and add in you web.config file where you want to refer the service.
Upvotes: 2
Reputation: 76
You can do it by creating SOAP message and sending web request Like in this SOAP client web request
Upvotes: 3