我有一个网站,其中包含一个在某些点发出各种 SOAP 请求的表单。其中一个请求获取返回的诱导时间列表并将其显示给用户,以便他们选择一个。我从 SOAP 服务返回的结果很好,但不幸的是,它似乎没有正确显示信息,甚至根本没有显示返回的对象键。我已经与 SOAP 端的一位开发人员联络,他说服务很好并且吐出 cirrect 信息。他提供了一个截图:
这是我调用此信息所需的方法的代码:
public function getInductionTimes($options) {
$client = $this->createSoapRequest();
$inductionTimes = $client->FITinductionlist($options);
//die(print_r($inductionTimes));
return $inductionTimes;
}
private function createSoapRequest() {
$url = 'https://fitspace.m-cloudapps.com:444/FITSPACE/MHservice.asmx?WSDL';
$options["connection_timeout"] = 25;
$options["location"] = $url;
$options['trace'] = 1;
$options['style'] = SOAP_RPC;
$options['use'] = SOAP_ENCODED;
$client = new SoapClient($url, $options);
//die(print_R($client->__getFunctions()));
return $client;
}
如您所见,我在收到代码后立即打印代码以检查我收到的内容,它是这样的:
正如你所看到的,这个 IDdtstring 字段被完全忽略了。有没有人知道为什么会发生这种情况?它与编码有关吗?我似乎无法解决这个问题!谢谢