【发布时间】:2011-01-04 23:38:10
【问题描述】:
当我尝试使用该应用程序时,我正在开发一个 c# 桌面应用程序并使用在 php 应用程序中开发的 webservies。我只是添加了该网络服务的网络参考,并尝试通过以下代码访问
WebReference.TestWSDL pdl = new testingApp.WebReference.TestWSDL();
string copy = pdl.verify("testing");
当我尝试调用方法验证时它会引发错误。错误是
可能的 SOAP 版本不匹配:信封命名空间 http://schemas.xmlsoap.org/wsdl/ 出乎意料。期待http://schemas.xmlsoap.org/soap/envelope/。
网络服务链接就像
【问题讨论】:
-
也许您的 WSDL 是使用无效命名空间生成的?查看生成的 Web 服务文件并尝试将名称空间更改为预期的名称。
标签: c# php web-services desktop-application