我正在使用php
(yii2
),我想實現與服務器的SOAP通信。我有以下指導SOAP:如何在php中籤署SOAP消息
The Customer’s system uses the Customer’s private key for issuing digital signatures. Both the application request (ApplicationRequest) and the SOAP message must be signed separately in the WSC. The signature is performed with the private key. The signing system must include in the signature also the certificate. This certificate contains the public key corresponding to the private key used in the signing. The receiver uses the public key to authenticate the signature.
和:
Next step: Digitally sign (detached type XML Digital Signature) the whole SOAP message with the Private Key of Sender Certificate and put the signature into SOAP-header
所以,我有自己的private.key
,public.key
和certificate.cer
我的代碼看起來像
$client = new SoapClient($wdsl, ['trace' => true]);
$arguments = ['DownloadFileListRequest' => $dflr];
$appResponse = $client->__call('downloadFileList', $arguments);
但我得到預期的錯誤:
SOAP signature error
我要做什麼以及如何簽署此SOAP?