Visual Studio 2010 SOAP service reference returns

2019-09-06 13:52发布

问题:

A client generated using Visual Studio 2010's 'Add Service Reference' tool returns a null value for calls to any remote function.
The server is a Perl CGI script (SOAP::Transport::HTTP::CGI) that I know is functioning correctly through testing with other clients. I used POD::WSDL to generate the WSDL file that the 'Add Service Reference' requires.

I have confirmed that the server is getting messages from the client and returning the appropriate results which has lead me to conclude that there is some flaw in either the client configuration or in .NET's XML parser. No errors are thrown and I don't try anything tricky in the application that invokes the client.

Has anyone had this problem before? Or know how to get at debugging information for XMLSerializer? Could the WSDL file be describing the means to send correctly but not how to interpret the response?

Service.ServiceHandlerClient client = new Service.ServiceHandlerClient("ARMService", "https://domain/server_soap");
string wut = client.cat_test("a", "b"); // should return "a b"
Console.WriteLine("results: " + wut ); // is always null!

回答1:

What a miserable solution I've found for this:

In the 'Add Service Reference' wizard there is a button at the bottom 'Add Web Service' that spawns another utility that worked immediately. This only leaves the question of why the other wizard would produce a proxy that works for most of the functionality but not all of it.