All pastes #411676 Raw Edit

lite xml-rpc

public xml v1 · immutable
#411676 ·published 2007-03-27 05:05 UTC
rendered paste body
 SUMMARY:  The text below is the basic definition of a lightweight xml-based remote procedure call protocol. It supports complex objects, unicode and type coercion while keeping a very small footprint whenever possible.             A - FORMAT DESCRIPTION1. Server originated commands are sent using a <s> root node.  Client originated commands are sent using a <c> root node.2. Method calls are issued using a c="className:methodName" attribute using the char ":" as separator.3. simple parameters can be sent using a p=""  attribute. For multiple parameters, use a "*" to separate them.4. More complex parameters should be sent using a sequence of <p> nodes, which can use CDATA tags for Unicode strings and <i> subnodes for items of a list (array). 5. if the t="" attribute has a value of "a"  ( ie, array ), subnodes will be parsed to compose an array object.6. <p> nodes and their subnodes ( <i> ) should support type coercion if a t=""  attribute is present.Initially only coercion to integer numbers ( t="n" ) should be implemented.            EXAMPLES: Example 1. Parameterless method call:<s c="pinger:ping" />Example 2. Call a method with simple parameters:<s c="gate:doLogin" p="prologic*12345" />Example 3. Call a method with parameters supporting Unicode and type coercion:<s c="gate:doLogin"/>    <p><![CDATA[ Unicode text parameter 1 ]]></p>    <p t="n" >3567</p></s>Example 4. Call a method supporting array objects and Unicode and type coercion:<s c="gate:doLogin"/>    <p t="a" ></p>       <i>item 1 of the array is a string</i>       <i t="n">456</i>       <i><![CDATA[ item 3 of the array supports Unicode ]]></i>    </p>    <p t="n" >3567</p></s>