I have a wsdl file that is automatically generated by the nusoap. The server side code is
require_once('lib/nusoap.php'); //include required class for build nusoap web service server
require_once('conf.php');
// Create server object
$server = new soap_server();
// configure WSDL
$server->configureWSDL('Upload Files');//, $namespace);
// Register the method to expose
$server->register('upload_files', // method
array('files' => 'xsd:string'), // input parameters
array('return' => 'xsd:string'), // output parameters
'', // namespace
'', // soapaction
'', // style
'', // use
'Uploads files to the server' // documentation
);
// Define the method as a PHP function
function upload_files($files) {
//code here
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
WSDL seems to be generated properly and is located here: http://dannyphantom.zg5.ru/server.php?wsdl
The client side code fails almost immediatly, right when I try to create a SoapClient:
require_once('lib/nusoap.php');
$wsdl="http://dannyphantom.zg5.ru/server.php?wsdl"; // SOAP Server
try {
$client=new SoapClient($wsdl, array('trace'=>true, "cache_wsdl" => WSDL_CACHE_NONE)); // Connect the SOAP server
//code
} catch(SoapFault $e) {
//...
} catch (Exception $e) {
//...
}
Now, no matter what I try to do - every time I get an error:
"SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://dannyphantom.zg5.ru/server.php?wsdl' : failed to load external entity "http://dannyphantom.zg5.ru/server.php?wsdl"
I feel like I've searched to whole Google and tried numerous fixes - nothing works. The url_allow_fopen is set to 1. I can open the link as a file manually. I have tried setting
libxml_disable_entity_loader(false);
before creating the new instance. cURL and openSSL extensions are loaded (even though they are not required for HTTP connection). None of this helped. I am totally out of any ideas. Would appreciate any help.
PHP version is 5.2. Client code is run from Drupal 5 (Don't think that makes any difference)