I have a problem connecting to a web service, below is my code:
$path = __DIR__;
$wsdl = "https://wisetest.nobisassicurazioni.it/wisewebserviceptf/service.asmx?WSDL";
$urlC = $path."/wise-europeanbroker.vbnl6w.p12";
$soap_args = array(
"login" => "europeanbrokers",
"password" => "xxxxxx",
"local_cert" => $urlC,
'user_agent' => 'PHPSoapClient',
"user_agent" => "PHP/SOAP",
"accept" => "application/xml",
"exceptions"=>true,
"trace" => true,
"http" => array('protocol_version' => '1.0'));
try {
$context = stream_context_create($soap_args);
$client = new SoapClient($wsdl,array('stream_context' => $context));
echo "Connection ok\n";
} catch (SoapFault $e) {
var_dump($e.message);
}
I think the above code is OK but I always get the below error:
string(428) "SoapFault exception:
[WSDL] SOAP-ERROR: Parsing WSDL:
Couldn't load from 'https://wisetest.nobisassicurazioni.it/wisewebserviceptf/service.asmx?WSDL' :
failed to load external entity "https://wisetest.nobisassicurazioni.it/wisewebserviceptf/service.asmx?WSDL"
in D:\siti\soap.test.local\SClient.php:40
Stack trace:
#0 D:\siti\soap.test.local\SClient.php(40):
SoapClient->SoapClient('https://wisetes...', Array)
#1 {main}message"
What could be the problem?