• Post Reply Bookmark Topic Watch Topic
  • New Topic

xml-rpc custom objects mapping  RSS feed

 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey


i am working with apaches xml-rpc (version 2 since version 3 is currently giving some problems) and want to "map custom objects". that is i want to make a call to XmlRpcClient.execute("findhHouses") and receive a List of House objects back instead of a List/Array of Maps (where each map contains all the data of a house).

or in other words: i want to define a mapping of a response to a custom class or list of classes.

how can i achieve this ? is there a way to plug something in xml-rpc or do i have to "parse" it external ?
is this in the XML parse level or outside ?
are there any ready made libs (dont tell me i am the only one doing this :-) ) ?

(if you know something which only works for version 3 of xml-rpc, that would be ok too)


thanks for your help and have a nice day

pascal
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would write a constructor for a house object that takes a Map. XML-RPC is simpler, faster, and easier to understand than SOAP because it restricts itself to certain structures. Go with the flow.

Bill
[ June 06, 2006: Message edited by: William Brogden ]
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Bill

i somehow do not want to mix my domain objects with XML-RPC stuff thats why i moved the construction part out in a factory. since the domain is pretty simple this all works nice...

pascal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!