Help with Soap Client

From: Date: Sun, 19 Apr 2009 04:27:51 +0000
Subject: Help with Soap Client
Groups: php.soap 
Request: Send a blank email to php-soap+get-2919@lists.php.net to get a copy of this message
Hi All, I am using the following code to build a SoapClient with some web service: //////////////// <?php ini_set("soap.wsdl_cache_enabled", "0"); ini_set('default_socket_timeout', 600); $client = new SoapClient("http://iaspub.epa.gov/webservices/StationService/index.html?WSDL",array('trace' => 1)); try { $sc = $client->getStationCount(43.1,43.5,-83.5,-83.1); print $sc; } catch (SoapFault $exception) { echo $exception; } ?> ////////////// But I got the following error: /////////////// Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Unspecified encodingStyle in /var/www/myphp/wqxststest.php:5 Stack trace: #0 /var/www/myphp/wqxststest.php(5): SoapClient->SoapClient('http://iaspub.e...', Array) #1 {main} thrown in /var/www/myphp/wqxststest.php on line 5 /////////////// Also when I tried same code (See below) with another service, it seems working fine. /////////////// <?php $huc = $_REQUEST['huc']; ini_set("soap.wsdl_cache_enabled", "0"); ini_set('default_socket_timeout', 600); $client = new SoapClient("http://iaspub.epa.gov/webservices/WatershedSummaryService/index.html?WSDL",array('trace' => 1)); try { $client->getCharacteristicSummary($huc); print $client->__getLastResponse(); } catch (SoapFault $exception) { echo $exception; } /////////////// ?> I tried to find what's causing this error on Google but no success. Anyone know what's going on? Your help is highly appreciated! Tom

« previous php.soap (#2919) next »