Answer the question
In order to leave comments, you need to log in
What could be wrong with SOAP if there is access via cURL?
There is a certain wsdl server, let's say " https://192.168.333.3/LNetworkServer/LNetworkServi... " (the address for the post is fictitious).
Opens fine in browser.
When I try to use SOAP, I get an error:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://sh333skd1-dev/LNetworkServer/LNetworkService.svc?wsdl=wsdl0' : failed to load external entity "https://sh333skd1-dev/LNetworkServer/LNetworkService.svc?wsdl=wsdl0"
$wsdl = "https://192.168.333.3/LNetworkServer/LNetworkService.svc?wsdl";
$arrContextOptions=array(
'ssl'=>array(
'verify_peer'=>false,
'verify_peer_name'=>false,
'allow_self_signed' => true
),
'https' => array(
'curl_verify_ssl_peer' => false,
'curl_verify_ssl_host' => false)
);
$options =array(
'trace' => 1,
'soap_version' => SOAP_1_1,
'location'=>'https://192.168.333.3/LNetworkServer/LNetworkService.svc',
'exceptions' => 1,
'cache_wsdl'=>WSDL_CACHE_NONE,
'verifypeer' => false,
'verifyhost' => false,
'stream_context' => stream_context_create($arrContextOptions),
'login'=>'root', 'password'=>'1234' ,
'classmap' => array('AcsEmployeeSaveData' => "AcsEmployeeSaveData")
);
//подключение
$client = new SoapClient($wsdl, $options);
try {
$opts = array(
'ssl'=>array(
'verify_peer'=>false,
'verify_peer_name'=>false,
'allow_self_signed' => true
),
'https' => array(
'curl_verify_ssl_peer' => false,
'curl_verify_ssl_host' => false,
'user_agent' => 'PHPSoapClient',
'allow_self_signed' => true
)
);
$context = stream_context_create($opts);
$wsdlUrl = 'https://192.168.333.3/LNetworkServer/LNetworkService.svc?wsdl';
$soapClientOptions = array(
'trace' => 1,
'location'=>'https://192.168.333.3/LNetworkServer/LNetworkService.svc',
'exceptions' => 1,
'cache_wsdl'=>0,
'verifypeer' => false,
'verifyhost' => false,
'stream_context' => $context,
'login'=>'root', 'password'=>'1234' ,
'classmap' => array('AcsEmployeeSaveData' => "AcsEmployeeSaveData")
);
$client = new SoapClient($wsdlUrl, $soapClientOptions);
}
catch(Exception $e) {
echo $e->getMessage();
}
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://sh333skd1-dev/LNetworkServer/LNetworkService.svc?wsdl=wsdl0' : failed to load external entity "https://sh333skd1-dev/LNetworkServer/LNetworkService.svc?wsdl=wsdl0"
Answer the question
In order to leave comments, you need to log in
You need to check the address $wsdl = " https://192.168.333.3/LNetworkServer/LNetworkServi... "; it should open in a normal browser.
Are you sending a SOAP envelope with CURL or just making a GET/POST request?
perhaps you are not forming the correct envelope for yourself, bring the WSDL fragment of the function you are calling and the SOAP envelope you are sending
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question