three minute server tutorial
This is a very quick introduction to xws4j. Skim read it to get an idea of how simple it is to create a XMPP IO Data service. I'm sure you'll have questions afterwards.
The server side of xws4j is a connecting component for XMPP servers. Please refer to your XMPP server manual to configure your XMPP server to accept connections from connecting component.
To create a default configuration file for your xws4j connecting component:
java -classpath "xws4j-current.jar:jso-full.jar" net.bioclipse.xws.component.Component new-cfg xws-component.cfg
To run the xws4j connecting component:
java -classpath "jso-full.jar:xws4j-current.jar" net.bioclipse.xws.component.Component run xws-component.cfg
Create a Java project. The project must have a class with the name Functions. This class must be located in package net.bioclipse.xws.component.functions, and must implement interface IFunctions. The method getFunctions() returns an array with all the function classes provided to the service component. The xws4j connecting component will host and publish the provided functions to the XMPP network.
The provided function classes must implement interface IFunction. The method getFunctionInformation() returns an object that holds a description of this function, including function's input and output XML Schemata. The method run(IProcessStatus ps, Element input) performs the calculation.
Now create a similar class for the second supported function "makeNewCoffee" yourself.
Export the project as a .jar and add the file's location to xws4j component's configuration file.