I am working on a script with PHP4 that relies on NuSOAP. Now I am trying to port this to PHP5 and am using buildin support for SOAP there.
$wsdlPath = ""; // I have obviously set these variables to something meaningful, just hidden for the sake of security $apiPath = ""; $username = ""; $password = ""; // PHP5 style $client = new soapclient($wsdlPath, array('login'=>username, 'password'=> $password, 'soap_version'=> SOAP_1_2, 'location'=> $apiPath, 'trace'=> 1)); // PHP4/NuSOAP style $client = new soapclient($wsdlPath, true); client->setEndpoint($apiPath); $client->setCredentials($username, $password); $client ->loadWSD);
The PHP5 version throws the following stacktrace exception:
EXCEPTION=SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://external-nbb.napi.norwegian.no.stage.osl.basefarm.net/api/napi1300?wsdl' in /home/eisebfog/public_html/database/norwegian.php:31 Stack trace:
Now that the NuSOAP version is working, but pure PHP5 is not, the brain surgeon does not need to find out that I am doing something wrong. I have access to the .htaccess file, and through phpinfo () I made sure that I use NuSOAP correctly and run PHP5 when I have to, and PHP4 / Nusoap when I have to.
Basically, I am not very good at web services and soap, but if anyone has any ideas, I would appreciate any information about what I am doing wrong, and about how I can go to the native soap in PHP5. Btw, resonance I want this step to primarily involve saving resources in my own soap. I would appreciate any references to the tests between the two solutions.
soap wsdl php port nusoap
JΓΈrgen emerslund
source share