I'm loading existing PHP code onto a new server and getting a fatal error with a soap wsdl:
$this->client = new SoapClient(
"
https://servername.jws?WSDL",
array("classmap" => $this->classmap,
"location" => "
https://servername.jws",
"trace" => true,
"exceptions" => true
)
);
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '
https://servername.jws?WSDL' failed to load external entity '
https://servername.jws?WSDL'
If I test the wsdl in a test page:
$wsdl = "
https://servername.jws?WSDL";
echo file_get_contents($wsdl);
I get an ssl error:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_C
ERTIFICATE
:certifica
te verify failed
A co-worker suggested this:
$arrContextOptions=array
(
"ssl"=>array
(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
This works for the test scenario, but I have no idea how to incorporate it into the soap client???
Or is there another avenue to resolve the issue???
Any help would be appreciated!