haxr (XML RPC) rendering of string values

Björn Bringert bringert at cs.chalmers.se
Thu Dec 1 07:27:08 EST 2005

Johannes Waldmann wrote:
> with haxr-20050621, I have trouble interfacing to Java.
> When I build an XML RPC call with haxr, containing a struct, I get
> <?xml version='1.0' ?>
> <methodCall
>   ><methodName
>     >vorlesungen</methodName
>   ><params
>     ><param
>       ><value
>         ><struct
>           ><member
>             ><name
>               >schule</name
>             ><value
>               ><string
>                 >HTWK Leipzig</string></value></member> ...
> but when I build the same call with org.apache.xmlrpc, I get
> <?xml version="1.0"?><methodCall><methodName>vorlesungen</methodName>
> <params><param><value><struct><member><name>matrikel</name><value>531</value></member>
> <member><name>schule</name><value>HTWK</value></member> ...
> the difference is that haxr has extra <string> tags
> for values of arguments. I don't think this is right?
> Best regards,

Ah, I seem to have missed one important sentence in the XML-RPC spec 
[1]: "If no type is indicated, the type is string.".

The way I understand the spec, having the <string>...</string> is 
optional. So what HAXR produces is valid and should be accepted by any 
implementation. However, I think HaXR won't accept a call without an 
explicit type tag. In other words, I would expect HaXR's calls to be 
understood by anyone, but that HaXR won't understand all valid calls. Is 
that what happens?


[1] http://www.xmlrpc.com/spec

More information about the Libraries mailing list