我需要使用带证书的webService肥皂。
我有.pfx文件和密码。
我的代码是下一个
require_once('lib/nusoap.php');
$endpoint = "https://interno.vuds-omc.es:9000/WSRegistroMedico";
$localCert = "cert.pfx";
$options = array(
'local_cert' => $localCert,
'passphrase' => 'key0666001',
'soap_version' => 'SOAP_1_2',
'encoding' => 'ISO-8859-1',
'compression' => '(SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP)',
'location' => '');
$client = new soapclient('http://binterno.vuds-omc.es:8000/WSRegistroMedicos?wsdl', $options);
$err = $client->getError();
if ($err) { // Display the error
echo "<h2>Error</h2>" . $err ; // At this point, you know the call that follows will fail
}
//$strxml is a string with the xml format
$result = $client->call('ActualizacionColegiado',$strxml);
我得到的请求是“未经授权的用户”所以,我认为它没有取得证书
谢谢!