How to create PHP SOAP with HTTPS webservice and .PEM client certificate ?
When i did that i received the follow errors:
array(2) { [0]=> string(38) "testeResponse teste(teste $parameters)" [1]=> string(38) "testeResponse teste(teste $parameters)" }
Fatal error: Uncaught SoapFault exception: [wsse:InvalidSecurity] SOAP header missing in D:\Inetpub\wwwroot\SOAP\index.php:47 Stack trace: #0 [internal function]: SoapClient->__call('teste', Array) #1 D:\Inetpub\wwwroot\SOAP\index.php(47): SoapClient->teste(Array) #2 {main} thrown in D:\Inetpub\wwwroot\SOAP\index.php on line 47
The code:
$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;