+ -
当前位置:首页 → 问答吧 → soap问题!

soap问题!

时间:2011-09-29

来源:互联网

以下是我php代码:
  1. $client = new SoapClient('http://sdc-ax-mcc-002.timogen.com/PmcWcfServices_sisd/PmcWcfService.svc?wsdl');


  2. $result = $client->GetTestResult();
复制代码



报错如下:
  1. Fatal error: Uncaught SoapFault exception: [HTTP] Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'.
复制代码


真心求教大虾,这是啥错? 何如修改?

作者: substr   发布时间: 2011-09-29

你提供service时用的是WCF吧,而且是一个新的版本。该版本无法匹配php客户端。
你试试这个解决方案:
修改wcf服务的绑定类型,由binding="wsHttpBinding" 改为 binding="basicHttpBinding" 。
这个设定确保.NET Web服务将支持符合WS-I标准的客户端和其他服务。

作者: faiinlove   发布时间: 2011-09-29

消息来看是你发送的type和他的不一致

作者: 剑枫   发布时间: 2011-09-29

热门下载

更多