Re: [SOAP] Help with Soap Client

From: Date: Sun, 19 Apr 2009 13:15:51 +0000
Subject: Re: [SOAP] Help with Soap Client
Groups: php.soap 
Request: Send a blank email to php-soap+get-2920@lists.php.net to get a copy of this message
Hi Tom,   The problem is in the WSDL. Search for  those lines  having  use="encoded" in WSDL file and append  encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"  with them..   Previous:  use="encoded" After Modification :  use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"   Hope it works!   Naveen --- On Sun, 4/19/09, EPA WC <epawcweb@gmail.com> wrote: From: EPA WC <epawcweb@gmail.com> Subject: [SOAP] Help with Soap Client To: soap@lists.php.net Date: Sunday, April 19, 2009, 9:57 AM 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 -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.soap (#2920) next »