|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-04-07 16:54 UTC] stef at rouschop dot com
Description: ------------ I've deployed a new server with php 7.0.5-2+deb.sury.org~trusty+1 (and included php7.0-SOAP) and I noticed the SOAP script was generating a SOAP-ERROR: SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://demo.l1nda.nl/api/webservice/?wsdl' : failed to load external entity "https://demo.l1nda.nl/api/webservice/?wsdl" in.... After some investigation I noticed that on other servers where 7.0.3-5+deb.sury.org~trusty+1 is installed there are no errors. This is the small script I'm using for my tests on the servers to see if it works/fails: Test script: --------------- $client = new \SoapClient("https://demo.l1nda.nl/api/webservice/?wsdl", ["trace" => 1,"exceptions" => true,]); var_dump($client->__getFunctions()); Expected result: ---------------- array:6 [ 0 => "sendResponse send(send $send)" 1 => "get_changed_eventsResponse get_changed_events(get_changed_events $get_changed_events)" 2 => "get_eventsResponse get_events(get_events $get_events)" 3 => "sendResponse send(send $send)" 4 => "get_changed_eventsResponse get_changed_events(get_changed_events $get_changed_events)" 5 => "get_eventsResponse get_events(get_events $get_events)" ] Actual result: -------------- SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://demo.l1nda.nl/api/webservice/?wsdl' : failed to load external entity "https://demo.l1nda.nl/api/webservice/?wsdl" in.... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 09:00:01 2025 UTC |
Hi, I have the same error: "class LibXMLError#1 (6) { public int $level => int(1) public int $code => int(1549) public int $column => int(0) public string $message => string(137) "failed to load external entity "...anaddress/awsdl?wsdl" " public string $file => string(0) "" public int $line => int(0) } C:\TestApiSoapWithPhp\testCaricaVersamento.php:79: SOAP-ERROR: Parsing WSDL: Couldn't load from '...anaddress/awsdl?wsdl' : failed to load external entity ".../anaddress/awsdl?wsdl" with this code: $context_options = array( 'ssl' => array( 'verify_peer' => false, 'verify_host' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, 'crypto_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT, ), ); $soap_client_options = array( 'user_agent' => $user_agent, 'login' => $username, 'password' => $password, 'authentication' => SOAP_AUTHENTICATION_BASIC, 'exception' => false, 'keep_alive ' => false, 'encoding' => 'UTF-8', 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE, 'cache_wsdl' => 0, 'trace' => 1, 'local_cert' => $local_cert, 'passphrase' => $passphrase, 'stream_context' => stream_context_create( $context_options ), 'soap_version' => SOAP_1_1, ); $soap_client = new SoapClient( $wsdl, $soap_client_options ); echo "\n Metodi disponibili:\n" . var_export( $soap_client->__getFunctions(), true ); And it happens only when "local_cert" is specified. I'm using PHP 8.2.13 on windows 11. Without specifying local_cert I have the list of the methods. However I ha to specify the file to call the methods. The same code is working on a debian with php 7.4. I can't understand which are the differcences between the two configurations. Claudio