James Gray
12/21/2007 2:40:00 AM
On Dec 20, 2007, at 5:35 PM, s.ross wrote:
> On Dec 20, 2007, at 3:05 PM, James Gray wrote:
>
>> On Dec 20, 2007, at 4:58 PM, s.ross wrote:
>>
>>> As a followup, I can parse the returned XML string using =20
>>> XmlSimple, which works ok. I just thought the parsing took place =20
>>> automagically in the XMLRPC parser.
>>
>> OK, forgive me for not getting this, but you've shown us two pieces =20=
>> of XML. One look XML-RPCish, but the other did not. Can you =20
>> please show the full response, as you receive it? If those item =20
>> codes are returned inside of the <string> =85 </string> tags you =20
>> showed earlier, XML-RPC is just giving you what the XML said it =20
>> received, a String.
>>
>> James Edward Gray II
>
> No, forgive me for the sort of vague question.
No worries. I get it now.
> <?xml version=3D\"1.0\" encoding=3D\"utf-8\"?>
> <methodResponse>
> <params>
> <param>
> <value>
> <string>
> <theWSResponse sessionid=3D"02632086050044137264314155577353" =20=
> membername=3D"my_member_name">
> <imageList>
> <image fileid=3D"3782426" type=3D"Image" title=3D"Wide =
Angle of =20
> 777 Building""/>
> <image fileid=3D"3782472" type=3D"Image" title=3D"Buoys for =
=20
> Lobster Pots, Bar Harbor, Maine"/>
> <image fileid=3D"3782503" type=3D"Image" title=3D"Ornate =
Clock =20
> in Grand Central Station"/>
> </imageList>
> </theWSResponse>
> </string>
> </param>
> </methodResponse>
Yeah, that's an odd use of XML-RPC structures. Instead of passing you =20=
an Array of Structs, which a library could completely extract, they =20
give you a custom XML protocol inside a normal String. Sad really as =20=
they clearly don't understand the point of XML-RPC.
There's no getting around it, you'll need to make a second XML parsing =20=
pass as you have mentioned doing.
> By the way, is there a better way to get this raw data than in ruby-=20=
> debug?
I'm not aware of an easy way to get the data, no.
James Edward Gray II