Hello all :) I have an Axis2 WebService with incoming request signing enabled (Rampart module using Signature
in InflowSecurity
setting). I'm trying to call it in PHP, using a local certificate:
$client = new SoapClient(
"http://localhost:8081/axis2/services/SomeWebService?wsdl",
array(
"local_cert" => "C:\ws\MyProject\php\cert.pem",
"trace" => 1));
var_dump($client->__soapCall(
"someFunction",
array("someParameter" => "blabla"))); // line X
Content of cert.pem:
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
This is the error I get:
Fatal error: Uncaught SoapFault exception: [soapenv:Server]
org.apache.ws.security.components.crypto.Merlin cannot create instance in
C:\ws\MyProject\php\index.php:X
The thing is org.apache.ws.security.components.crypto.Merlin
is a server-side Exception (that I also get in the server logs); but when I remove "local_cert" => "C:\ws\MyProject\php\cert.pem"
or change it to "local_cert" => "C:\ws\MyProject\php\thereisnofilehere.pem"
I get the exact same error.
Which tells me PHP does not use the certificate at all. Or, am I missing something here? How do I make sure PHP uses the certificate to sign the request?