Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am trying to retrieve latitude and longitude via

I use this code, as seen on
( ):

   // Create new instance of the SoapClient class
   // You'll need to download the WSDL file from:
   $client = new SoapClient("geocoder.wsdl");
   // Retrieve the address coordinates
   $result = $client->geocode("411 Woody Hayes Dr, Columbus, OH");
   // Dump the returned object

I get this error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Unexpected WSDL element in c:\program files\apache
group\Apache\htdocs\loctest.php:44 Stack trace: #0 c:\program
files\apache group\Apache\htdocs\loctest.php(44):
SoapClient->__construct('c:\program file...') #1 thrown in
c:\program files\apache group\Apache\htdocs\loctest.php on line 44

I'm using the WSDL file at along with PHP5.1 and
Win XP Pro.

Has any one done this successfully?  Can any one help me figure out
what could be wrong??

Re: PHP, SOAP and wrote:
Quoted text here. Click to load it


Re: PHP, SOAP and wrote:
Quoted text here. Click to load it

The WSDL contains some non-printable characters, which PHP doesn't like.

Once stripped, everything will work as expected. For your convenience, I  
have prepared a stripped copy for you, which you can download from here:



Re: PHP, SOAP and

Janwillem Borleffs wrote:
Quoted text here. Click to load it

Thanks...  I never would have guessed.

Site Timeline