XML-RPC data types for Qworum, version 1.0 Draft
Abstract
This specification defines an XML vocabulary for XML-RPC data types.
Table of contents
1. Introduction
1.1. Purpose
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.
1.2. Requirements
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].
2. Concept
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.
3. The http://qworum.net/xmlrpc namespace
The XML elements defined in this specification have the http://qworum.net/xmlrpc namespace [XMLnamespaces].
4. Data types
4.1. The int and i4 types
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>
4.2. The boolean type
The boolean data type represents a boolean value. It contains 0 (for false) or 1 (for true). Example:
<boolean xmlns='http://qworum.net/xmlrpc'>1</boolean>
4.3. The string type
The string data type represents a string of characters. Example:
<string xmlns='http://qworum.net/xmlrpc'>hello world</string>
4.4. The double type
The double data type represents a double-precision signed floating point number. Example:
<double xmlns='http://qworum.net/xmlrpc'>-12.214</double>
4.5. The dateTime.iso8601 type
The dateTime.iso8601 data type represents a date/time value. Example:
<dateTime.iso8601 xmlns='http://qworum.net/xmlrpc'>1998-07-17T14:08:55</dateTime.iso8601>
4.6. The base64 type
The base64 data type represents a base64-encoded binary. Example:
<base64 xmlns='http://qworum.net/xmlrpc'>eW91IGNhbid0IHJlYWQgdGhpcyE=</base64>
4.7. The struct type
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.
4.8. The array type
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.
5. Appendices
5.1. References
| [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 |
5.2. Revision history
| 2011.09.23 | Initial release. |
5.3. Copyright and disclaimer
© 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.