Changes between Version 3 and Version 4 of ExampleUsingXmlRpcBeans
- Timestamp:
- 10/09/06 14:49:35 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ExampleUsingXmlRpcBeans
v3 v4 18 18 - a conversion mapping for that type is put at the XmlRpcBean (which then acts as an API itself) 19 19 - it is an XmlRpcBean (that is, XmlRpcBeans can be nested) 20 - it is a Collection or Map containing a type which is XML-RPC compliant and is annotated with the @Contains annotation 21 20 22 21 23 Technically, an !XmlRpcBean is converted into a XML-RPC STRUCT. The field names of the tranfered map are the property names derived from the bean class. … … 54 56 }}} 55 57 58 == Client side == 59 60 Again, the client has no restrictions using the bean class: 61 {{{ 62 public interface Api 63 { 64 @Contains(CoffeeBean.class) 65 Collection<CoffeeBean> getAllBeans(); 66 } 67 68 Api remote_api = XmlRpc.createClient( Api.class, "handlerId", host, port ); 69 70 Collection<CoffeeBean> beans = remote_api.getAllBeans(); 71 72 for( CoffeeBeans b: beans ) 73 { 74 System.out.println( "Bean of type " + b.getType() + " comes from " + b.getOrigin() ); 75 } 76 ... 77 }}} 78 56 79 See also [http://delight.opendfki.de/wiki/ExampleUsingOwnConceteTypes#UsingowntypesinCollectionsandMaps How to use own types in Collections an Maps].