感谢使用“ Signed Soap Client” https://github.com/dmvrtx/php-signed-soap-client的@dmvrtx,我可以使用p12文件和密码向Web服务发出请求。它运作良好,但是现在我的客户要求我通过2个pem文件(一个带有证书,一个带有私钥)提出请求。原因是出于安全原因不提供密码。
请帮助我修改代码以使用2个pem文件而不是证书和密码文件?
$wsdlPath = $baseProjectDir . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'WSDL' . DIRECTORY_SEPARATOR . 'WEBSERVICE_CUSTOMER.WSDL';
$soapoptions = array(
'location' => $this->endpoint,'trace' => true,'exceptions' => true,'ssl' => array(
'cert' => $this->certificateName,'certpasswd' => $this->certificatePassword
),'cache_wsdl' => WSDL_CACHE_NONE
);
$this->soapClient = new SignedSoapClient($wsdlPath,$soapoptions);