我有一個網站,其中包含一個表格,在某些點上發出各種SOAP請求。其中一個請求獲得返回的歸納時間列表,並將其顯示給用戶以便他們選擇一個。 我得到的結果很好地從SOAP服務返回,但不幸的是它似乎沒有正確顯示信息,甚至根本不顯示返回的對象鍵。 我已經與SOAP端的開發人員聯繫了,他說服務很好,並且吐出了正確的信息。他提供了一個screentshot:SOAP錯誤。沒有得到正確的結構返回
這裏是我的代碼拉叫我需要此信息的方法:
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;
}
正如你可以看到我的print_r我收到後右邊的代碼它來檢查我被退回了我,它是這樣的:
正如你可以看到這IDdtstring字段被完全忽略。 有沒有人有任何想法,爲什麼這可能會發生?這與編碼有關嗎?我似乎無法解決這個問題! 謝謝