PHP SOAP内容类型

时间:2017-01-12 08:02:15

标签: php soap content-type

我尝试使用PHP从Microsoft服务器上运行的SOAP服务获得响应,我有:

$this->client = new SoapClient(
   'https://url.com/EmployeeService.svc?wsdl', 
   array('soap_version' => SOAP_1_2, 'cache_wsdl' => WSDL_CACHE_NONE)
);
$this->client->__soapCall("GetEmployees", ['token']);

但我得到错误:

Cannot process the message because the content type 'application/soap+xml; charset=utf-8; action="http://tempuri.org/IEmployeeService/GetEmployees"' was not the expected type 'text/xml; charset=utf-8'.

所以我将版本更改为SOAP_1_1,但后来我收到错误:

  

看起来我们没有XML文档

接下来我必须改变什么吗?或者问题是什么?

由于

0 个答案:

没有答案