xmlrpc weather |
[eluser]jdfwarrior[/eluser]
I'm playin around with the XMLRPC library and was trying to pull Weather from weather.com's site through thier api. With the provided url they provide to pull the xml, I get what looks like a valid response, but the xmlrpc class obviously things other wise. Code: ---DATA--- I keep getting this error every time. Code: $this->xmlrpc->set_Debug(TRUE); This all the code I'm using at this point, just trying to get a successful return. Anyone see anything I'm doing wrong or have any experience with this that could point me in the right direction?
[eluser]jdfwarrior[/eluser]
The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further. Top level XML-RPC element is missing.
[eluser]pistolPete[/eluser]
Your XML is not a valid XML-RPC response. There must be either a <methodCall> or a <methodResponse> element: http://www.xmlrpc.com/spec You are not using XML-RPC, you only get an XML formatted response which you need to parse accordingly. Btw: You should remove the API key from above...
[eluser]TheFuzzy0ne[/eluser]
Nuts. I thought I'd be able to help by looking at the source code, but I keep getting lost... Sorry.
[eluser]CroNiX[/eluser]
You might also be able to tell a little by looking at the response you get back, not just if there is an error. Code: $response = $this->xmlrpc->display_response();
[eluser]jdfwarrior[/eluser]
Thats what this is.. "The XML data received was either invalid or not in the correct form for XML-RPC. Turn on debugging to examine the XML data further. Top level XML-RPC element is missing. " Anyone know of an easy way to parse this out? Been beating my head against the wall for a while now messin with it
[eluser]CroNiX[/eluser]
No, you are viewing only the error, not the direct response in its entirety.
[eluser]jdfwarrior[/eluser]
Yeah good call, but response doesnt return anything
[eluser]mitchwilson[/eluser]
I'm having a problem with this too. The response printed to my browser is Array. |
Welcome Guest, Not a member yet? Register Sign In |