For response payloads, the cm-payload
root element contains one or more cm-response
elements after the cm-header
element with which each result of the operations performed by the server is returned.
If a request payload has been completely recognized and processed by the server, each cm-response
element in the response payload corresponds to a cm-request
element in the request payload. In this case, the cm-response
elements contain messages which refer to the contents of the requests (Request Level Message).
If, on the other hand, the Content Management Server receives an invalid request payload (e.g. without a cm-header
element or with unrecognizable cm-request
elements), it returns a response payload containing only one cm-response
element with which the general error is reported. In this case, the cm-response
element refers to the payload (Payload Level Message). A cm-response
element is constructed as follows.
<!ELEMENT cm-response (cm-code*)> <!ATTLIST cm-response response-id CDATA #REQUIRED payload-id CDATA #IMPLIED request-id CDATA #IMPLIED success ("true" | "false") #REQUIRED >
The individual responses to the requests are returned in cm-code
elements.
<!ELEMENT cm-code ANY> <!ATTLIST cm-code numeric CDATA #REQUIRED phrase CDATA #REQUIRED >
The attributes of the cm-response
element have the following meanings:
response-id
payload-id
payload-id
attribute of the request payload. This attribute is added by the server only when the cm-response
element contains a payload level message in the first cm-code
element. A client can consequently recognize by the occurrence of this attribute whether its request payload could be interpreted as such by the server (independent of the requests contained in it).request-id
receiver-id
attribute of the cm-request
element in the request payload. This attribute is only present when the cm-code
element contains a request level message.success
true
when the request could be successfully processed. Otherwise, it is false
.Please note that several operations can be performed within a request. In this case, the success
attribute contains the logical And of the results of all operations performed. This means, success
is only true
when all operations were successful.
The results of the operations performed are returned with the aid of cm-code
elements within the cm-response
element. The cm-code
elements contain a success or error message and other XML elements which represent the result of the operation or if necessary error information.
The attributes of the cm-code
element have the following meanings:
numeric
phrase
The content of the cm-code
element depends on the operation indicated in the request. In operations which could not be performed successfully, the content of the cm-code
element depends on the error which occurred. The possible contents of the cm-code
element are listed for each operation in the XML Reference.