1
我是來自PHP的WS調用的新手。任何人都可以告訴我如何從這個WS中讀取數據。__soapCall - 如何撥打正確的電話?
這裏是我的代碼
$wsdl = "https://test.saljfinans.handelsbanken.se/xml/netxservice.wsdl";
$username = 'user';
$password = 'password';
$contractNumber = XXXXXX;
$orderNumber = '7871';
$call = array("contractNumber" => $contractNumber, "orderNumber" => $orderNumber);
$client = new SoapClient($wsdl, array('cache_wsdl' => WSDL_CACHE_NONE, 'trace' => 1));
//var_dump($client->__getFunctions());
//var_dump($client->__getTypes());
$name = 'namespace';
$text = '';
$text .= '<authHeaderRequest><credentials><username>'.$username.'</username><password>'.$password.'</password></credentials></authHeaderRequest>';
$var = new SoapVar($text, XSD_ANYXML, null, null, null);
$header = new SoapHeader($name, 'authHeaderRequest', $var);
$client->__setSoapHeaders($header);
$response = $client->__soapCall("getInvoiceOrder", array("getInvoiceOrderRequest_t" => $call), null, $header);
我得到 致命錯誤:未捕獲的SOAPFault異常:[客戶] SOAP的錯誤:編碼:對象有沒有 '要求' 屬性
怎麼辦我打電話給它工作?
你設法得到它的工作?因爲我遇到的問題完全一樣:/ – Muqito