xmlrpc - XML-RPC Data Types (original) (raw)

The XML-RPC specification defines the following available data types:

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 (0, or1).
String string A string, non-null.
Double double A signed, non-null, doubleprecision, floating point number.(64 bit)
java.util.Date dateTime.iso8601 A pseudo ISO8601 timestamp, like19980717T14:08:55. However,compared to a true ISO8601 value,milliseconds, and time zoneinformations are missing.
byte[] base64 A base64 encoded byte array.
java.util.Map struct A key value pair. The keys arestrings. The values may be anyvalid data type, including anothermap.
Object[]java.util.List array An array of objects. The arrayelements may be any valid datatype, including another array.The server may return other arrays (forexample String[]) or lists (usinggenerics). However, the client willalways return an Object[], becausethe XML-RPC protocol doesn't includebetween different array types.

If the property enabledForExtensions is set, then additional data types become valid. (Both client and server do support this property.)

Java Type XML Tag Name Description
None ex:nil A typeless null value.
Byte ex:i1 A 8-bit, signed, and non-null,integer value.
Float ex:float A signed, non-null, doubleprecision, floating point number.(32 bit)
Long ex:i8 A 64-bit, signed, and non-null,integer value.
org.w3c.dom.Node ex:dom A DOM node, which is beingtransmitted as an embedded XMLfragment.
Short ex:i2 A 16-bit, signed, and non-null,integer value.
java.io.Serializable ex:serializable An object, which is converted intoa serialized representation andtransmitted as a base 64 encodedbyte array.
BigDecimal ex:bigdecimal A BigDecimal
BigInteger ex:biginteger A BigInteger
java.util.Calendar ex:dateTime Unlike the dateTime.iso8601 type,this is a full blown xs:dateTimevalue. In particular, it includesmilliseconds, and timezone settings.

In the above table, the prefix ex refers to the namespace URI http://ws.apache.org/xmlrpc/namespaces/extensions.