【发布时间】:2012-12-07 07:59:05
【问题描述】:
如何使用 HTTPS 网络服务和 .PEM 客户端证书创建 PHP SOAP?
当我这样做时,我收到以下错误:
array(2) { [0]=> string(38) "testeResponse teste(teste $parameters)" [1]=> string(38) "testeResponse teste(teste $parameters)" }
致命错误:未捕获的 SoapFault 异常:[wsse:InvalidSecurity] D:\Inetpub\wwwroot\SOAP\index.php:47 中缺少 SOAP 标头 堆栈跟踪:#0 [内部函数]:SoapClient->__call('teste ', Array) #1 D:\Inetpub\wwwroot\SOAP\index.php(47): SoapClient->teste(Array) #2 {main} 在 D:\Inetpub\wwwroot\SOAP\index.php 中抛出在线47
代码:
$client = new SoapClient($wsdl, array(
'local_cert' => $localCert,
'passphrase' => $passphrase,
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'exceptions' => true,
'trace' => true)
);
$something = $client->teste(array());
echo $something->testeResult;
【问题讨论】:
标签: php web-services soap certificate soapheader