1 | | See [http://delight.opendfki.de/wiki/ExampleUsingOwnConceteTypes#UsingowntypesinCollectionsandMaps How to use own typed in Collections an Maps]. |
| 1 | == Using XmlRpcBeans in you API == |
| 2 | |
| 3 | What are XmlRpcBeans?? |
| 4 | |
| 5 | |
| 6 | Sometimes parameter conversion is a straight-forward task which can be handed over to the XML-RPC runtime system. |
| 7 | When a java class fulfills certain conditions (roughly, being a java bean with complatible types) it can be turned into a XmlRpcBean |
| 8 | by annotating it with the @!XmlRpcBean annotation. It then can be used in every XML-RPC call without restriction. |
| 9 | A XmlRpcBean must have |
| 10 | |
| 11 | - a public constructor taking no arguments |
| 12 | |
| 13 | - like a java bean: for each property which is supposed to be transported over XML-RPC there has to exist a public getter and setter method |
| 14 | |
| 15 | - each peroperty type has to be XML-RPC compliant, that is it has to have one of the follwoing properties: |
| 16 | |
| 17 | - it is a standard XML-RPC type |
| 18 | |
| 19 | - it is annotated with a @!XmlRpc annotation and defines proper conversion methods |
| 20 | |
| 21 | - a conversion mapping for that type is put at the XmlRpcBean (which then acts as an API itself) |
| 22 | |
| 23 | - it is an XmlRpcBean (that is, XmlRpcBeans can be nested) |
| 24 | |
| 25 | See also [http://delight.opendfki.de/wiki/ExampleUsingOwnConceteTypes#UsingowntypesinCollectionsandMaps How to use own types in Collections an Maps]. |