------------------------
Simple Request for XML (SRX) Specification Version 0.9
------------------------
SRX is perhaps the most straight forward method of sending and receiving a
structured message between an HTTP client and server. It is simpler than
SOAP, and can be tested with any web browser which supports HTML forms. It
also has the benefit of being tightly integrated into HTML, so it's easy to
add to an existing web site.
The idea is to take what is currently the most common way of sending
structured data to a web server, that is using HTTP GET or POST with
url-encoded form data, and receive the response in XML. That's it. SRX does
not try to invent any new method of sending data, as HTTP GET and POST
already have a way to do that, and it's included in just about every
available browser. What is missing is a structured response format, as HTML
does not provide a simple way to do that.
SRX does not define an XML namespace or any specific XML elements, as that
is up to the implementation to define what the XML contents should be. SRX
simply requires sending an HTTP GET or POST to a web server and then getting
an HTTP response containing XML data.
Any message API can be written using SRX, by simply defining the set of HTML
FORM elements with allowed data types and values for each. Then one or more
corresponding XML responses must be defined, including namespace and
definition of allowed elements and attributes for each. If you want to get
fancy, you can define a full schema for the response XML. Make sure to include
a clear explanation of each XML response and what it means.
serviceInfo Element
A "serviceInfo" element may be used in an SRX response to indicate the name
and version of the current service. The element contains a "name" and "version"
attribute. It is recommended to place the serviceInfo element at the top of an
SRX response body.
The name attribute can be any case-sensitive alphanumeric string (names can
include "-" and "_") up to 255 characters. The version attribute can be any
alphanumeric string (can also include "." and "-") up to 255 characters
corresponding to the version of the service currently in operation. Any
serviceInfo elements which do not contain a name or version value must be ignored.
It is recommended to encode text as UTF-8. If such encoding is used, it must be
properly declared in the HTTP header as well as in the XML body as follows:
<?xml encoding="UTF-8"?>
That's it. It is a simple specification, so why ramble on.
This specifications provided here are licensed to the public under a Creative Commons Attribution 3.0 license.