The header for the POST data should have the following format. Replace the items in brackets with user- and command-specific information.
POST / HTTP/1.0 Content-Type: text/xml X-Username: (OpenSRS Username) X-Signature: (MD5 Signature) Content-Length: (Length of XML Document)
Following this header should be one blank line followed by the XML document that contains the OpenSRS command data. The header combined with the XML makes up the packet that is sent to OpenSRS to execute your command.
The response is returned in the form of an XML document. Responses contain data that may be simple strings or lists of information.
There are a few common fields that all responses share, regardless of the action to which they are responding. The following fields comprise a standard response message. Some actions only use standard response messages.
|protocol||The protocol that is being used (XCP).|
|action||In the case of responses, this is always REPLY.|
|response_code||Response code (meaning is action-specific).|
|response_text||Response text (meaning is action-specific).|
|is_success||Indicates whether the command was successful. Returns 0 if not successful and 1 if the action was successful.|
In addition, the structure may contain the following fields, depending on the specific action that was requested.
|attributes||A hash that contains any specific parameters or attributes to be sent along with the action request.|
Updated about 1 year ago