wiki:WikiStart

XML-RPC Delight

Using XML-RPC the easy way ...

The logo has been designed by Dominik Heim


XML-RPC Delight is meant for: All users that want to have their java components connected using a web-based protocol but don't want to waste time with defining the interfaces a second time in another language-independend description format and then generate stubs and skeletons and so on.

XML-RPC Delight is an addon to the XML-RPC specification (http://www.xmlrpc.com/spec) and builds on apache's implementation (http://ws.apache.org/xmlrpc/), version 1.1 (Download here, patched to handle UTF-8, long strings containing control characters and XML markup correctly; transfer full exception stacktrace).


Design Objectives

  • have java components interact over internet wire with a minimum of programming and configuration effort

  • preserve XML-RPC compliance

  • make EVERY type XML-RPC transportable with minimal coding effort (ideally, not a single line of extra code!)

  • do not interfere with design of remote interfaces. Within the remote calls, one should be able to use any type or interface he wants.
  • neither the client nor the server has to be forced to load configuration files or register factories programatically in order to use non XML-RPC compliant types in remote calls.

Overview

XML-RPC Delight creates remote clients to java APIs that are supposed to be used remotely. XML-RPC Delight does this at runtime, not at compile time!
In case the API uses types which are not XML-RPC compliant, java annotations and user-defined conversion methods allow for automatic transformation of types to and from a XML-RPC compliant representation. Optimally, one can use non-compliant java classes in XML-RPC calls without having to code a single line of code!!

While all the automatic conversion is done, communication with the server is still XML-RPC compliant so that remote methods can still be called by non-java languages.


How does it Work?

Examples

Getting started -- Using XML-RPC compliant types in your API

Using own concrete types in your API

Using interface or abstract types in your API

Using third party types in your API -- When you cannot annotate or modify classes you want to use remotely ...

For lazy programmers: using XmlRpcBeans -- Own types without conversion coding ...

Using the Parameter Converter Registry -- Enabling converters even without @ConverterMappings annotation ...

Ideas for Version 3

  • Current drawbacks:
    • based on plain-old xml-rpc 1.1
    • only XML-RPC supported (JSON is also nice)
    • configuration settings are static
    • no handler life-cycle supported

Author

This library was developed by Andreas Lauer. It is used in several projects of the DFKI's Knowledge Management Lab including Mymory, Nepomuk, Perspecting,Epiphany and DynaQ.
Other projects include Medical CPS http://www.dfki.de/MedicalCPS/MCPS.jpg

License

The library is published under LGPL.

Download

Latest Version 2.6.3

http://www.dfki.uni-kl.de/artifactory/libs-releases-local/dfki/km/delight/xmlrpc-delight/2.6.3/xmlrpc-delight-2.6.3-dist-all.zip

Artifact coordinate (using repository http://www.dfki.uni-kl.de/artifactory/libs-releases)

<dependency>
  <groupId>dfki.km.delight</groupId>
  <artifactId>xmlrpc-delight</artifactId>
  <version>2.6.3</version>
</dependency>

Changes

  • added enum support
  • fixed: Bugs in xml-rpc:1.1
    • strings containing only spaces were discarded in method call
    • strings containing control characters caused exceptions
    • strings containing xml markup like (<[CDATA[ ]]>) caused trouble

Version 2.5.1

Changes


Latest Version: 2.2.1 http://delight.opendfki.de/repos/trunk/XmlRpcDelight/dist/XmlRpcDelight-2.2.1_04.03.2009.zip

Changes

  • minor fixes (method typos), no new features
  • added URL c'tor to XmlRpcConnection
  • added FileConverter

Version 2.2:

Changes

  • added new feature: unknown, xml-rpc unaware types without annotations are treated as XmlRpcBeans enable with: XmlRpc.treatUnkownTypesAsBeans( true )
  • added support for types Float and float
  • support for sets added
  • new automatic null-value masking feature: XmlRpc.useAutomaticNullMasking( true ) enables the feature

values for all standard XML-RPC types (except BASE64), arrays and Convertable parameters can now be null-values. XmlRpcBeans can have null-valued properties. ParameterConverters can handle null-values separately, but also can rely on the new masking feature.

  • Note: this version is java 1.5 compliant

Version 2.0:

Changes

  • Contains annotation not needed anymore
  • Array support added (also supported: primitive type arrays)
  • Nested parameters and return types for collections, maps and arrays possible
  • 'null'-parameters can be used together with ParameterConverters
  • Better logging support

v 1.0: https://delight.opendfki.de/repos/trunk/XmlRpcDelight/dist/XmlRpcDelight-1.0_17.11.2006.zip

SVN Repository

A subversion repository is setup at https://delight.opendfki.de/repos/. Use the repository to checkout the latest version of XML-RPC Delight.

Documentation

http://delight.opendfki.de/repos/trunk/XmlRpcDelight/apidoc/index.html

Also see some slides on XML-RPC Delight (for version 1.0) available in ppt or pdf format.

Feature Requests

  • add an example how to run delight through a servlet
  • automatically find the most specific converter for a type when there is a set of converters for a type hierarchy
  • switch to newer version of apache XML-RPC (because of better XML and authentication handling)
    • make backend exchangable
    • delight should be independent of any XmlRpc implementation
  • use slf4j for logging/debugging
Last modified 2 years ago Last modified on 10/21/22 11:15:21

Attachments (1)

Download all attachments as: .zip