我是来自 PHP 的 WS 调用的新手。谁能告诉我如何从这个 WS 读取数据。
这是我的代码
$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 异常:[Client] SOAP-ERROR: Encoding: object has not 'request' property
如何调用它?