1

I am trying to connect a wsdl file using soapClient like

$client = new SoapClient("https://example.com/webservices?wsdl");

But my problem is ,The url is only accessible using its SSL certificate and key otherwise this url return error "SSL Certificate error".

Is it possible to connect the wsdl using SSL?

NOTE : It is not password protected ,I have no user name and password.Only one certificate pem file and its private key

Shijin TR
  • 7,516
  • 10
  • 55
  • 122

1 Answers1

0

You need to pass the certificate to SoapClient

$wsdl = "https://my-server/?wsdl";
$my_cert_file = "/my/path/to/mycert.pem";

$client = new SoapClient($wsdl, array('local_cert', $my_cert_file) ); 
Jon
  • 766
  • 1
  • 9
  • 27