Plastic in XML-RPC

Applications written in most non-Java languages will use the Plastic XML-RPC interface. With apologies to these developers, the Plastic specification is currently written in Javadoc. This page offers guidance on how to translate the Javadoc into XML-RPC, and is extracted from Appendix C of the Plastic Specification.

See also the Plastic in... page to see if there is already example code showing how to use PLASTIC in your language of choice.

Extract from the Plastic Specification

The XML-RPC method names are the same as for Java-RMI, except that: the client method org.votech.plastic.PlasticListener.perform maps to perform, and the hub methods beginning org.votech.plastic.PlasticHubListener.* map to plastic.hub.*.

Since a message transmitted using the Java-RMI communication protocol must have precisely the same meaning as an equivalent one transmitted using XML-RPC, all message arguments and return values must be losslessly translatable between Java objects and XML-RPC value elements. Therefore only those Java object types which have exact equivalents in XML-RPC may be used in message argument lists and return values. Behaviour of the Hub if it receives a message with invalid argument types is undefined. The following table lists the correspondence between the two forms; the Hub will transform between these types when translating a message or response from one communication protocol to the other.

Java Type XML Tag Name Description
Integer i4, or int A 32-bit, signed, and non-null, integer value.
Boolean boolean A non-null, boolean value
String string A string, non-null.
Double double A signed, non-null, double precision, floating point number.
java.util.Map struct A key value pair. The keys are strings. The values may be any valid data type, including another map.
java.util.List array An array of objects. The array elements may be any valid data type, including another array.
In addition, some Plastic method signatures include URI argument types in the Java-RMI form. These are translated to and from strings for the XML-RPC form. Logo