Jump to content

consuming webservice with soap extension


pienez

Recommended Posts

hello, I have a problem with consuming a webservice

 

I use SOAP extions from PHP5 and for some reason it doesnt want to work.  I looked at tutorials and examples I could find but nothing worked.

 

this is the code I use

<?php

try {

    $client = new SoapClient("http://webservices.daehosting.com/services/ISBNService.wso.wsdl");

  $result = $client->IsValidISBN13(array('sISBN'=>'978-90-234-2696-7'));

} catch (Exception $e) {

      echo 'Error Caught'.$e;

}

 

  echo '<h2>Request</h2>';

  echo 'htmlspecialchars($client->request, ENT_QUOTES)';

  echo '<h2>Response</h2>';

  echo 'htmlspecialchars($client->response, ENT_QUOTES)';

 

  print_r($result);

?>

 

I know there is nothing wrong with the webservice I already was able to reach its with nusoap and jou also can see the WSDL here:

http://webservices.daehosting.com/services/ISBNService.wso?WSDL

 

the error I get is this one:

Warning: SoapClient::SoapClient(http://webservices.daehosting.com/services/ISBNService.wso.wsdl) [function.SoapClient-SoapClient]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\wamp\www\tripplanner\client.php on line 3

 

Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "http://webservices.daehosting.com/services/ISBNService.wso.wsdl" in C:\wamp\www\tripplanner\client.php on line 3

Error CaughtSoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://webservices.daehosting.com/services/ISBNService.wso.wsdl' in C:\wamp\www\tripplanner\client.php:3 Stack trace: #0 C:\wamp\www\tripplanner\client.php(3): SoapClient->SoapClient('http://webservi...') #1 {main}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.