Welcome Guest, Not a member yet? Register   Sign In
XML-RPC question
#1

[eluser]Unknown[/eluser]
I'm using XML-RPC to access Google Maps API geocoder just with a URL and querystrings, ie no method call and am getting back succesful results from my request(seen with debugging turned on), but am getting the following error message:

---Invalid Return--- Top level XML-RPC element is missing---Invalid Return---

The xml that gets returned looks ok to me...here's a snippet:
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<kml ><Response>
  <name>53.2167,15.6667</name>
  <Status>
    <code>200</code>
    <request>geocode</request>
  </Status>
  <Placemark id="p1">
    <address>73-210, Poland</address>....

The google api docs are here: http://code.google.com/apis/maps/documen...ing_Direct

Is this an API that can't be used with XML-RPC?....

Thanks in advance for any responses
#2

[eluser]Phil Sturgeon[/eluser]
<kml > should be <kml> perhaps? Had a space like that in the last XML file I wrote which caused an error, just throwing a guess in there ;-)
#3

[eluser]Nick Husher[/eluser]
The extra whitespace following an open tag declaration shouldn't matter if the XML parser is worth its salt. The problem is that it doesn't conform to the XML-RPC spec, and is (rightly) considered to be an invalid response.

You should probably implement your own google service XML parser using PHP's XML parsing library.




Theme © iAndrew 2016 - Forum software by © MyBB