Greetings,
When I was developing an application in Java to my job I have a situation to solve: build a webservice and consumer as well. Despite the Netbeans have several wizards to create WebServices my application couldn’t have a dependence like GlasshFish , Tomacat or other stronger server.
After some time I found Axis2 [1] and some useful samples teaching how to do that. A sample consumer can be found here [2]. Then you can build the service, and there are to many samples in userguide (see simple example [3]). Now it was missing run it as a server, but it’s pretty easier as well, just look there:
public static void main(String args[]) throws AxisFault
{
AxisServer s = new AxisServer();
s.deployService(MyService.class.getName());
}
And it will run on port 6060, go for it: http://localhost:6060. It is also possible change the port in which server runs, using ConfigurationContext and SimpleHTTPServer.
Cheers!
[1] – ws.apache.org/axis2/
[2] – http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/samples/userguide/src/userguide/clients/EchoNonBlockingClient.java
[3] - http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/samples/userguide/src/userguide/example1/MyService.java