[Foundation] Jabber-RPC payload council question

DJ Adams dj.adams at pobox.com
Mon Sep 24 06:33:06 CDT 2001


Hi

jer asked a good question on the JEP voting for Jabber-RPC
this month. As I only have read-only access to the list ;-)
I was wondering how to answer - but David Waite did the 
honours:

http://mailman.jabber.org/pipermail/council/2001-September/000129.html

Thanks David.

For those interested / curious, the original question was
valid, as we could have had something like this:

<iq type='set' to='responder at company-a.com/jrpc-server' id='1'>
  <methodCall xmlns='jabber:iq:rpc'>
    <methodName>examples.getStateName</methodName>
    <params>
      <param>
        <value><i4>6</i4></value>
      </param>
    </params>
  </methodCall>
</iq>

which is perfectly valid but blurs the boundary between Jabber and
XML-RPC, which philosophically is OK but in practice means that an
extra step is involved in generating a clean XML-RPC encoding 
(i.e. removing the xmlns attribute from the methodCall tag). Doing
it this way:

<iq type='set' to='responder at company-a.com/jrpc-server' id='1'>
  <query xmlns='jabber:iq:rpc'>
    <methodCall>
      <methodName>examples.getStateName</methodName>
      <params>
        <param>
          <value><i4>6</i4></value>
        </param>
      </params>
    </methodCall>
  </query>
</iq>

means that the XML-RPC encoding is carried 'untainted' as a payload.

dj



More information about the Members mailing list