[JDEV] [JDEV]XML- RPC

Jonathan Augenstine jaugenstine at jambotech.com
Sat Mar 30 11:14:42 CST 2002


Nick,

You know that you can't do straight XMLRPC through jabber right? 
Yes.

>>If you pick up DJ Adams' Programming Jabber.
This is the second most important book in my life at the moment.

>>With all of that said, I dont quite think you understand the Jabber
Protocol well enough.
You will get no argument from me.  I installed Jabber about 5-6 weeks
ago and received Mr. Adams book shortly thereafter.  I am definitely
drinking from the firehose.

>>You can easily setup two clients and send whatever you want inside of
the confines of the Jabber protocol.
I have had two client nodes communicating and sending simple messages to
each other for about two weeks.

>>A more simplistic approach to RPC would be passing simple messages
within the <message/>.
We currently use that approach in other applications and are trying to
get away from that approach due to the inherent difficulty in
maintaining and extending the applications.

>>more complex would be embedding XMLRPC inside of a <message/>
I considered this but wanted to try to implement the RPC described by
Adams.

>>the proper way to do it is to wrap the XMLRPC in an <iq
xmlns='jabber:iq:rpc'/>.
This is what I attempted.  I should have provided more information on
what I did and the result I obtained.  Following is the XML I sent the
Jabber and its' response.

Sent by rpcclient:
BYTES sent: 229[<iq type='set' to='rpcserver at 192.168.1.152'
id='1'><query
xmlns='jabber:iq:rpc'><methodCall><methodName>switch.StartCall</methodNa
me><params><param><value><string>8186763443</string></value></param></pa
rams></methodCall></query></iq>]

Respnse from Jabber:
BYTES received: 314[<iq type='error' to='rpcclient at 192.168.1.152/Work'
id='1' from='rpcserver at 192.168.1.152'><query
xmlns='jabber:iq:rpc'><methodCall><methodName>switch.StartCall</methodNa
me><params><param><value><string>8186763443</string></value></param></pa
rams></methodCall></query><error code='503'>Service
Unavailable</error></iq>]

I realize that my ignorance about Jabber namspace and iq handling is the
problem.  I do not understand how to tell Jabber that my rpcserver will
handle the iq requests for the jabber:iq:rpc namespace.  This is where I
am looking for guidance.

>>I think overall, you need to think simple :)
I am a big fan of the Beauty Principle.

>>Feel free to IM me if you wanna talk more about JabberRPC.
Thank you for the offer.  Rest assured that I will be contacting you
next week.  I feel like I am groping in the dark and would appreciate
your feedback and input.

Jonathan

-----Original Message-----
From: Nicholas Perez [mailto:nick at jabberstudio.org] 
Sent: Friday, March 29, 2002 3:52 PM
To: jdev at jabber.org
Subject: Re: [JDEV] [JDEV]XML- RPC


You know that you can't do straight XMLRPC through jabber right? There
is a namespace for it 
and everything. If you pick up DJ Adams' Programming Jabber, there is a
section on doing 
JabberRPC, in java, python, and perl. Also, JabminRPC is a server
component that does 
administration and it uses purely iq:rpc. I ended up using mister DJ's
perl Jabber::Connection 
and Jabber::RPC libs (really the Jabber::RPC libs are just wrappers
around an XMLRPC parser 
so its not hard to write or substitute your own XMLRPC parser). With all
of that said, I dont quite 
think you understand the Jabber Protocol well enough. You can easily
setup two clients and send 
whatever you want inside of the confines of the Jabber protocol. A more
simplistic approach to 
RPC would be passing simple messages within the <message/>, more complex
would be 
embedding XMLRPC inside of a <message/>, and the proper way to do it is
to wrap the 
XMLRPC in an <iq xmlns='jabber:iq:rpc'/>. I think overall, you need to
think simple :) 

Feel free to IM me if you wanna talk more about JabberRPC. 

Nick

Nick at lug.du.edu

On Fri, 29 Mar 2002 11:10:15 -0800, "Jonathan Augenstine"
<jaugenstine at jambotech.com> wrote: I am developing a Jabber application
and I would like to use XML-RPC. Documentation is somewhat sparse and I
was wondering if I could have someone point me towards more info or
answer some questions.  I am using O'Reilly's "XML-RPC" book for the
XML-RPC packet format and am primarily looking for more info on Jabber
configuration help.

Basically, I want to develop two node applications with one acting as
the RPC-client and the other as the RPC-server.  I have sent an RPC
packet from the client to the server but it is rejected by Jabber with
an error code 503 - Service Unavailable.  The server node never sees the
request.

My questions are (I am running Jabber v1.4.2):
1. How do I tell the Jabber server that I am registering a node as an
RPC server? 2. Is this possible or does the RPC-server have to exist as
a module?

Jonathan Augenstine
Sr. Software Engineer
JamboTech, Inc.
jaugenstine at jambotech.com
818.676.3443

_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev

_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev



More information about the JDev mailing list