NuSOAP不发送凭据

时间:2011-11-11 23:20:55

标签: php soap nusoap

我正在尝试连接到使用HTTP基本身份验证和SSL保护的SOAP服务器。我尝试使用PHP的SOAP库,但后来放弃并使用了NuSAOP。我设置了我的凭据:

$soap = new nusoap_client('https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl', 'wsdl');
$soap->setCredentials('WS'.STORE_NUMBER.'._.1',
 PASSWORD,
 'certificate',
 array(
     'sslcertfile' => 'first_data/WS'.STORE_NUMBER.'._.1.pem',
     'sslkeyfile' => 'first_data/WS'.STORE_NUMBER.'._.1.key',
     'passphrase' => KEY_PASSPHRASE
 )
);
$proxy = $soap->getProxy();
$proxy->someRequest($data);

但是,凭据似乎不会发送,因为这是请求的标头:

POST /fdggwsapi/services HTTP/1.0
Host: ws.merchanttest.firstdataglobalgateway.com:443
User-Agent: NuSOAP/0.9.5 (1.123)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 489

我收到了401 Not Authorized回复。如何获取要发送的凭据?

0 个答案:

没有答案