|
Posted by www.douglassdavis.com on 09/25/05 05:07
I am trying to retrieve latitude and longitude via geocoder.us
I use this code, as seen on
(http://www.developer.com/lang/php/article.php/3548171):
<?php
// Create new instance of the SoapClient class
// You'll need to download the WSDL file from:
// http://geocoder.us/dist/eg/clients/GeoCoder.wsdl
$client = new SoapClient("geocoder.wsdl");
// Retrieve the address coordinates
$result = $client->geocode("411 Woody Hayes Dr, Columbus, OH");
// Dump the returned object
var_dump($result);
?>
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 {main} thrown in
c:\program files\apache group\Apache\htdocs\loctest.php on line 44
I'm using the WSDL file at
http://geocoder.us/dist/eg/clients/GeoCoder.wsdl 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??
Navigation:
[Reply to this message]
|