%ents; ]>
Jabber-RPC This specification defines an XMPP protocol extension for transporting XML-RPC encoded requests and responses between two XMPP entities. The protocol supports all syntax and semantics of XML-RPC except that it uses XMPP instead of HTTP as the underlying transport. &LEGALNOTICE; 0009 Final Standards Track Standards XMPP Core XML-RPC jabber-rpc http://xmpp.org/schemas/jabber-rpc.xsd DJ Adams dj.adams@pobox.com dj@gnu.mine.nu 2.2 2011-11-10 psa Corrected element name in XML schema from "Base64" to "base64". 2.1 2006-02-09 psa Defined error handling, service discovery, security considerations, and XMPP Registrar considerations. 2.0 2002-12-09 psa Per a vote of the Jabber Council, changed status to Final. 1.0 2001-09-27 psa Changed status to Draft 0.1 2001-09-14 dja Initial version

&xmlrpc; is a method of encoding RPC requests and responses in XML. The original specification defines HTTP (see &rfc2068;) as the only valid transport for XML-RPC payloads.

Various initiatives exist already to transport XML-RPC payloads over Jabber. These initiatives were independent of each other and used slightly differing methods (e.g. carrying the payload in a <message/> element as opposed to an &IQ; stanza), resulting in potential interoperability problems.

A working session during JabberCon 2001 resulted in formalisation of a single method. This document describes that method, which is labelled as Jabber-RPC to differentiate it from XML-RPC itself.

The &IQ; stanza is used to transport XML-RPC payloads. XML-RPC requests are transported using an &IQ; stanza of type "set", and XML-RPC responses are transported using an &IQ; stanza of type "result". An &IQ; stanza MUST NOT contain more than one request or response.

The &IQ; stanza contains a single &QUERY; sub-element in the jabber:iq:rpc namespace. The direct child of the &QUERY; element will be either a single <methodCall/> element (in the case of a request) or a single <methodResponse/> element (in the case of a response). This child element will contain the XML-RPC payload. Note that the XML declaration that normally appears at the head of an XML-RPC request or response when transported as the payload of an HTTP POST request MUST BE omitted when it is transported via a Jabber &IQ; stanza.

The encoding of the Jabber XML stream is UTF-8. It is assumed that the encoding of the XML-RPC payload is also UTF-8.

Application-level errors will be indicated within the XML-RPC payload (as is the case with the traditional HTTP-based XML-RPC mechanism). Transport level errors will be indicated in the normal way for &IQ; stanzas -- namely, by an &IQ; stanza of type "error" and the addition of an <error/> tag as a direct child of the &IQ; stanza. There are no specific XML-RPC-related, transport-level errors.

In September of 2011, it was discovered that the XML schema quoted in Section 8 contains an error, showing a child element of <Base64/> (uppercase "B") instead of <base64/> (lowercase "b"). A review of the XML-RPC specification and of numerous XML-RPC and Jabber-RPC implementations showed that the element name is properly "base64" and that the quoted schema was in error by having an element name of "Base64". Therefore this specification and its associated schema were modified to use the correct element name: "base64". It is possible that some existing Jabber-RPC implementations might send a child element of <Base64/>.

examples.getStateName 6 ]]> Colorado ]]>

If the requesting entity does not have sufficient permissions to perform remote procedure calls, the responding entity MUST return a &forbidden; error:

examples.getStateName 6 ]]>

If an entity supports the Jabber-RPC protocol, it SHOULD advertise that fact in response to &xep0030; information ("diso#info") requests by returning an identity of "automation/rpc" and a feature of "jabber:iq:rpc":

]]> ]]>

An entity that supports Jabber-RPC SHOULD establish a "whitelist" of entities that are allowed to perform remote procedure calls and MUST return a &forbidden; error if entities with insufficient permissions attempt such calls.

This document requires no interaction with &IANA;.

The ®ISTRAR; includes 'jabber:iq:rpc' in its registry of protocol namespaces.

The XMPP Registrar includes a Service Discovery type of "rpc" within the "automation" category in its registry of service discovery identities.

The protocol documented by this schema is defined in XEP-0009: http://www.xmpp.org/extensions/xep-0009.html There is no official XML schema for XML-RPC. The main body of this schema has been borrowed from an unofficial schema representation contained in the book "Processing XML With Java" by Elliotte Rusty Harold, as located at: http://www.ibiblio.org/xml/books/xmljava/chapters/ch02s05.html Corrected from "Base64" to "base64" in version 2.2 of XEP-0009. ]]>