Changes between Version 5 and Version 6 of WikiStart


Ignore:
Timestamp:
10/06/06 14:48:02 (18 years ago)
Author:
lauer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v5 v6  
    4444== Examples == 
    4545 
    46 [http://delight.opendfki.de/wiki/#ExampleUsingXmlRpcCompliantTypes] 
     46[wiki:ExampleUsingXmlRpcCompliantTypes Using XML-RPC compliant types in your API] 
    4747 
    48 [wiki:WikiStart#ExampleUsingOwnConceteTypes] 
     48[http://delight.opendfki.de/wiki/#ExampleUsingOwnConceteTypes] 
    4949 
    50 [wiki:WikiStart#ExampleUsingOwnInterfaceTypes] 
     50[http://delight.opendfki.de/wiki/#ExampleUsingOwnInterfaceTypes] 
    5151 
    52 [wiki:WikiStart#ExampleUsingThirdPartyTypes] 
     52[http://delight.opendfki.de/wiki/#ExampleUsingThirdPartyTypes] 
    5353 
    54 [wiki:WikiStart#ExampleUsingXmlRpcBeans] 
     54[http://delight.opendfki.de/wiki/#ExampleUsingXmlRpcBeans] 
    5555 
    56 === Using XML-RPC compliant types in your API === #ExampleUsingXmlRpcCompliantTypes 
    57  
    58 '''Server side''' 
    59  
    60  - The server side defines an API to be used remotely over XML-RPC. Additionaly an implementation 
    61    of the API is hosted on the server-side 
    62     
    63 {{{  
    64 interface Api { 
    65   String getStatusMessage( int code ); 
    66 } 
    67  
    68 class Impl implements Api { 
    69   public String getStatusMessage( int code ) {...} 
    70 } 
    71 }}} 
    72  
    73  - register implementation as XML-RPC handler with the server 
    74  
    75 {{{ 
    76 WebServer xmlRpcServer = new WebServer( port ); 
    77 xmlRpcServer.addHandler( "handlerId", XmlRpcHandlerFactory.createHandlerFor( new Impl() ); 
    78 xmlRpcServer.start(); 
    79 }}}     
    80  
    81 '''Client side''' 
    82      
    83  - create a remote client the use the API by simply calling a single method  
    84  
    85 {{{ 
    86 Api remote_api = XmlRpc.createClient( Api.class, "handlerId", host, port ); 
    87 String msg = remote_api.getStatusMessage( 42 ); 
    88 ... 
    89 }}}  
     56=== Using own concete types === # ExampleUsingOwnConceteTypes