Search code examples
c#.netvb.netweb-servicesgsoap

consume gsoap webservice from .NET client


From a .NET application, how do I consume a Web Service developed using gSoap c/C++ library?

I can create a C/C++ client using gSoap library to consume the web service. But I need to consume it from within a .NET (C#) application. I tried Adding a Web Reference but that doesn't seem to work.

Would I need to work with raw Soap Packets?


Solution

  • The reason Web reference was not working was the hand crafted WSDL. It worked fine with gSoap library and gSoap C/C++ code generrator nut not with VS. With some changes in the way WSDL was written, I am now able to consume the gSoap C/C++ web service by adding a Web Reference in Visual Studio and also by using HTTP GET method.

    Steps taken -

    • Instead of adding Web reference, use wsdl.exe in verbose mode to generate code using thee gSoap WSDL and XSD file
    • change the WSDL file to resolve any error and warnings reported by wsdl.exe
    • Once wsdl.exe can successfully generate code using the WSDL, you can now use VS add web / service reference wizard