XML-RPC data types for Qworum, version 1.0
The core Qworum specification uses XML [XML] for representing data. Yet XML data can be difficult to manipulate by the programming languages that are used to implement services. In order to address this issue, the present specification leverages the XML-RPC [XML-RPC] specification, and defines a particular XML vocabulary that can easily be deserialized into native programming language constructs.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [Keywords].
Qworum services MAY use the XML vocabulary defined in the present specification for representing data. Such data MAY be:
- received by services,
- sent back by services,
- used for representing the internal state of service calls.
The XML elements defined in this specification have the http://qworum.net/xmlrpc namespace [XMLnamespaces].
int and i4 data types represent a four-byte signed integer. Examples:
<int xmlns='http://qworum.net/xmlrpc'>-12</int> <i4 xmlns='http://qworum.net/xmlrpc'>-12</i4>
The boolean data type represents a boolean value. It contains 0 (for false) or 1 (for true). Example:
The string data type represents a string of characters. Example:
<string xmlns='http://qworum.net/xmlrpc'>hello world</string>
The double data type represents a double-precision signed floating point number. Example:
The dateTime.iso8601 data type represents a date/time value. Example:
The base64 data type represents a base64-encoded binary. Example:
A struct contains members and each member contains a name and a value. Here's an example of a two-element struct:
<struct xmlns='http://qworum.net/xmlrpc'> <member> <name>lowerBound</name> <value><i4>18</i4></value> </member> <member> <name>upperBound</name> <value><i4>139</i4></value> </member> </struct>
structs can be recursive, any value may contain a struct or any other type, including an array, described below.
An array contains a single data element, which can contain any number of values. Here's an example of a four-element array:
<array xmlns='http://qworum.net/xmlrpc'> <data> <value><int>12</int></value> <value><string>Egypt</string></value> <value><boolean>0</boolean></value> <value><int>-31</int></value> </data> </array>
array elements do not have names.
You can mix types as the example above illustrates.
arrays can be recursive, any value may contain an array or any other type, including a struct, described above.
|[XML]||Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, François Yergeau, Extensible Markup Language (XML), W3C Recommendation|
|[XML-RPC]||Dave Winer, XML-RPC specification|
|[Keywords]||Bradner, B., Key words for use in RFCs to Indicate Requirement Levels, RFC 2119|
|[XMLnamespaces]||Tim Bray, Dave Hollander, Andrew Layman, Richard Tobin, Henry S. Thompson, Namespaces in XML 1.0, W3C Recommendation|
© Copyright 2011 Doğa Armangil. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and these paragraphs are included on all such copies and derivative works. This document may not be modified in any way, such as by removing the copyright notice or references to Doğa Armangil or other organizations.
Any party may implement software that gives user agents the ability to send requests to the Enterprise license validation service, without royalty or license fee to Doğa Armangil.
THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN IS PROVIDED "AS IS", AND DOĞA ARMANGIL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. FURTHER, DOĞA ARMANGIL WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THIS DOCUMENT.