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 未授权响应。我怎样才能获得要发送的凭据?
I'm trying to connect to a SOAP server secured with HTTP Basic Authentication and SSL. I tried using PHP's SOAP library, but then gave up and used NuSAOP. I set my credentials:
$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);
However, the credentials don't appear to send, for here's the header of the request:
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
I get back a 401 Not Authorized response. How can I get the credentials to send?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论