It is possible to deploy my own created web service to any of PC without installing any web server app eg:tomcat? I want make it like agent/plug-in in any PC. In order to ac
You mention Tomcat as an example of what you don't want to do, but Tomcat can be run in embedded mode, where it gets started up from inside your application:
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/startup/Embedded.html
Saying that, I'd recommend Jetty, it's more light-weight than Tomcat.
Take a look at Apache CXF. It can use jetty for stand-alone web-services. It integrates with Spring which makes it easy to add a web-service simply as spring-bean with very little additional code.
same question with Lightweight Webservice producing in Java (without an application server)
javax.xml.ws.Endpoint.publish("http://localhost:8000/myService/", myServiceImplementation);
You will need something listening for a http connection. Fortunately Java 6 has all you need in the default runtime.
Have a look at:
http://hofmanndavid.blogspot.com/2008/11/easiest-way-to-publish-java-web.html
I've been following this pretty basic tutorial, and it does just what you want
http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/
It seems like the Java SE 6 platform has a small web application server that will publish the web service while the JVM is running.
A perfect solution is here from IBM
https://www.ibm.com/developerworks/webservices/tutorials/ws-jse/