Changes between Version 3 and Version 4 of ExampleUsingXmlRpcCompliantTypes


Ignore:
Timestamp:
05/22/07 12:17:48 (18 years ago)
Author:
lauer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExampleUsingXmlRpcCompliantTypes

    v3 v4  
    11== Using XML-RPC compliant types in your API == 
    22 
    3 If you use types in your remote calls wich are XML-RPC compliant things are very easy: 
     3If you use types in your remote calls which are XML-RPC compliant things are very easy: 
    44 
    55'''Server side''' 
    66 
    7  - The server side defines an API to be used remotely over XML-RPC. Additionaly an implementation 
     7 - The server side defines an API to be used remotely over XML-RPC. Additionally an implementation 
    88   of the API is hosted on the server-side 
    99    
     
    1111interface Api { 
    1212  String getStatusMessage( int code ); 
     13  int[] getInts(); 
    1314} 
    1415 
    1516class Impl implements Api { 
    1617  public String getStatusMessage( int code ) {...} 
     18  public int[] getInts() { return new int[]{ 1,2,3 }; } 
    1719} 
    1820}}} 
     
    3335Api remote_api = XmlRpc.createClient( Api.class, "handlerId", host, port ); 
    3436String msg = remote_api.getStatusMessage( 42 ); 
     37int[] ints = remote_api.getInts(); 
    3538... 
    3639}}}  
     
    4346 
    4447 - instead of solely using java type Hashtable for XML-RPC type STRUCT, also java type Map can be used.  
     48 
     49 - arrays of convertible types including their primitive counterparts (such as Integer, int, ...) can be used out-of-the-box