jmsnell 2002/12/30 18:34:51
Added: proposals/jabber Axis1.0_JabberTransport.zip readme
Log:
Experimental Jabber Transport for Axis 1.0
Revision Changes Path
1.1 xml-axis/proposals/jabber/Axis1.0_JabberTransport.zip
<<Binary file>>
1.1 xml-axis/proposals/jabber/readme
Index: readme
===================================================================
Experimental Jabber Transport for Axis 1.0
1. How to create an Axis Jabber Server
//String jabberID = "[username]@[jabber server]/[service name]";
String jabberID = "[EMAIL PROTECTED]/service1";
JabberServer server = new JabberServer(jabberID, password);
[username] == Your Jabber username (e.g. JamesMSnell)
[jabber server] == The jabber server (e.g. jabber.org)
[service name] == The name of the individual Axis service being exposed
2. How to create an Axis Jabber Client
JabberTransport transport = new JabberTransport();
transport.setTo("[EMAIL PROTECTED]/service1");
Service service = new Service(new XMLStringProvider(dep));
Call call = (Call)service.createCall();
call.setOperationName(new QName("urn:test", "echo"));
call.addParameter("arg", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
call.setTransport(transport);
call.setUsername("[EMAIL PROTECTED]/client");
call.setPassword(password);
String s = (String)call.invoke(new String[] {"test"});
System.out.println(s);
3. What's on the wire
<iq
type="set"
to="[EMAIL PROTECTED]/service1"
from="[EMAIL PROTECTED]/client">
<!-- SOAP Envelope -->
</iq>
<iq
type="result"
to="[EMAIL PROTECTED]/client"
from="[EMAIL PROTECTED]/service1">
<!-- SOAP Envelope -->
</iq>
This is different from the version of the Jabber SOAP binding that other
toolkits use in that it eliminates an unnecessary extra element that adds
no value.
Will work on better documentation later.