Visual Studio 2010 SOAP service reference returns only null values

自闭症网瘾萝莉.ら 提交于 2019-12-11 15:46:09

问题


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.



来源:https://stackoverflow.com/questions/3841127/visual-studio-2010-soap-service-reference-returns-only-null-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!