我可以加载 wsdl,提取函数和数据类型就好了,但是当我尝试调用服务器上的函数时,出现连接错误。当我查看 $request 中传递的soap数据时,它不包含任何安全证书,也不会产生错误。
我的代码如下所示:
// setup the transaction array
$header = array('local_cert' => "certificate.pem",
'logonUser' => "user_name",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'exceptions' => true,
'trace' => true);
// create the soap client, this will log us in
$client = new SoapClient($wsdl, $header);
try
{
$response = $client->getMessage($parameters);
}
catch (Exception $e)
{
dumpVars($client->__getLastRequest());
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>
所以我的问题是,我需要做什么才能让安全证书通过?
谢谢,
皮特