473,811 Members | 2,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("geo coder.wsdl");
// Retrieve the address coordinates
$result = $client->geocode("411 Woody Hayes Dr, Columbus, OH");
// Dump the returned object
var_dump($resul t);
?>

I get this error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Unexpected WSDL element in c:\program files\apache
group\Apache\ht docs\loctest.ph p:44 Stack trace: #0 c:\program
files\apache group\Apache\ht docs\loctest.ph p(44):
SoapClient->__construct('c :\program file...') #1 {main} thrown in
c:\program files\apache group\Apache\ht docs\loctest.ph p 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 2342

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
4210
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 setup correctly. using jboss-tomcat engine. This looks like text formatting issues.
6
3059
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; use strict; use warnings;
2
4457
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 trying to fire up one method i get following error: System.Web.Services.Protocols.SoapHeaderException: Method 'tns:prodsearch' not implemented
8
6319
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. Is there a document, or can some one list those types that are not serializable and the syntax for converting them? Thanks
0
4851
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 WebService/Schema. Unable to import binding 'MyRemoteObjectBinding' from namespace 'http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull'. Unable to import...
0
5609
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 SERVER================ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
1
2275
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 = SOAPpy.SOAPProxy("http://secure.easynic.com/com/iomart/ easynicWSv2.cfc?wsdl") data = test.login(_id='test',_pass='pass')
2
6774
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 definitely getting a hit when I use a browser to get to my hibye.cgi server (well, a blank page rather than a 404). However, when I run my hibye.pl client, I receive a 503 Service Unavailable at H:\scripts\hibye.pl line 25. It works when I...
0
2254
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. The problem I have is the first record gets processed fine where as the second record always; reason being the EAI expects it to be a seperate call Though I am creating/reseting a new service everytime within the foreach loop the data seems to be...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7670
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.