473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

PHP, SOAP and geocoder.us



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??

Sep 25 '05 #1
3 2329

www.douglassdavis.com wrote:
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):


that's http://www.developer.com/lang/php/article.php/3548171

Sep 25 '05 #2
www.douglassdavis.com wrote:
Has any one done this successfully? Can any one help me figure out
what could be wrong??


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:

http://www.jwscripts.com/wsdl/geocoder.wsdl
JW


Sep 25 '05 #3

Janwillem Borleffs wrote:
www.douglassdavis.com wrote:
Has any one done this successfully? Can any one help me figure out
what could be wrong??


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:

http://www.jwscripts.com/wsdl/geocoder.wsdl
JW

Thanks... I never would have guessed.

Sep 25 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bigbinc | last post by:
I have setup a soap machine on linux and similar configuration works properly. on a windows mahcine, I get these erros on the addressbook, samples, any ideas. I am pretty sure my classpaths are...
6
by: JK | last post by:
Can anyone provide me with an ASP 2.0 example of how to call the geocoder service. They provide the following perl example for XML-RPC : #!/usr/bin/perl use XMLRPC::Lite; use Data::Dumper;...
2
by: Artur | last post by:
Hi Newsgroup, im currently working on programming a asp.net application consuming an Webservice hosted on Apache/Axis. I have generated WSDL and Proxy classes from VisualStudio.net. But when...
8
by: xmail123 | last post by:
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. ...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
0
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE...
1
by: gcmartijn | last post by:
H! When I use php code nusoap everything works but with python I get everytime "Your session key does not exist or has expired" I use this code below: test =...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.