|
|
TutorialsJini ExampleJxta Example Web Services RelatedJxtaJini Web Services For More InfoFrom P2P to Web Services and Grids: Peers in a Client/Server WorldIan J. Taylor, 2004 Publisher: Springer ISBN: 1-85233-869-5 |
The code for our simple Web service is as follows. Copy this into a file named SilverService.java or download from below:
public class SilverService {
public Object getIncrement(Object number) {
if (number instanceof Integer)
number = new Integer(((Integer)number).intValue()+1);
return number;
}
}
This code can be found here: SilverService.java
Now, you need to compile this code and place in in the correct place: javac -d $CATALINA_HOME/webapps/axis/WEB-INF/classes/ SilverService.java Note, here that $CATALINA_HOME/webapps/axis/WEB-INF/classes/ is where Axis looks for the class files for deployed Web services. You could develop in this directory also if you did not wish to set the destination for the class files each time. |