The following shows a request payload with two requests and a corresponding response payload. The subelements which may occur in cm-request
and cm-response
elements are described in section CRUL Payloads.
The ID and the name of all files with the file format report
are queried with the first request. The second request creates the color
field.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE request SYSTEM "http://www.example.com/cm.dtd"> <cm-payload payload-id="B42TE241" timestamp="20000705020223" cm.version="5.2"> <cm-header> <cm-sender sender-id="FX45RTDT" name="HTMLUI"/> <cm-authentication login="holmes" password="apple"/> </cm-header> <cm-request request-id="H4BPBYE3"> <obj-where> <objClass>report</objClass> </obj-where> <obj-get> <id/> <name/> </obj-get> </cm-request> <cm-request request-id="BH423MXA"> <attribute-create> <name>color</name> <type>string</type> </attribute-create> </cm-request> </cm-payload>
The first response in the response document contains the ID and the name of two files as a result. The second response contains the error message that the field already exists.
<?xml version="1.0" encoding="UTF-8"?> <DOCTYPE cm-payload SYSTEM "http://www.example.com/cm.dtd"> <cm-payload payload-id="B3BWPOIU" timestamp="20000705020224" cm.version="5.2"> <cm-header> <cm-sender sender-id="G33Z4GZU" name="CM SERVER"/> </cm-header> <cm-response response-id="BR12TI5X" request-id="H4BPBYE3" success="true"> <cm-code numeric="0" phrase="ok"> <obj> <id>3123</id> <name>reportMay</name> </obj> </cm-code> <cm-code numeric="0" phrase="ok"> <obj> <id>4831</id> <name>reportJune</name> </obj> </cm-code> </cm-response> <cm-response response-id="AQP3L24V" request-id="BH423MXA" success="false"> <cm-code numeric="1743" phrase="attribute already exits"> <attribute>color</attribute> </cm-code> </cm-response> </cm-payload>