XML-RPC Response Format - XML-RPC

What is XML-RPC Response Format?

Responses are similar like requests, with limited extra twists. If the response is positive - the procedure was found, executed properly, and returned results - then the XML-RPC response will look much like a request, except that the methodCall element is replaced by a methodResponse element and there is no methodName element:

  • An XML-RPC response can merely comprise one parameter.
  • That parameter may be an array or a struct, so it is likely to return multiple values.
  • It is all the time required to return a value in response. A "success value" - perhaps a Boolean set to true (1).

Like requests, responses are packed in HTTP and have HTTP headers. All XML-RPC responses use the 200 OK response code, even if a fault is contained in the message. Headers use a common structure similar to that of requests, and a typical set of headers might look like:

  • XML-RPC only requires HTTP 1.0 support, but HTTP 1.1 is compatible.
  • The Content-Type must be set to text/xml.
  • The Content-Length header specifies the length of the response in bytes.

A complete response, with both headers and a response payload, would look like:

Afterwards the response is delivered from the XML-RPC server to the XML-RPC client, the connection is locked. Follow-up requests need to be sent as separate XML-RPC connections.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML-RPC Topics