Is there any Java library allowing to build a simple standalone webservice server without any application server framework?
Asked
Active
Viewed 6,501 times
4 Answers
13
Java 6 contains JAX-WS, which makes it very easy to host a web service in a stand-alone application:
javax.xml.ws.Endpoint.publish("http://localhost:8000/myService/", myServiceImplementation);

Joachim Sauer
- 302,674
- 57
- 556
- 614
-
That's pretty cool, but is there a servlet equivalent, so I can run without a application server? – ggb667 Apr 17 '14 at 14:01
-
@GGB667: that's pretty much an entirely separate question, please ask that as a separate question (or better yet: search for it, I wouldn't be surprised if SO already had an answer for that). – Joachim Sauer Apr 18 '14 at 19:30
-
I couldn't find a nice one-liner like that, but found various tools that can be combined to create one with some work, nothing that elegant. : – ggb667 Apr 30 '14 at 21:16
-
https://www.ibm.com/developerworks/webservices/tutorials/ws-jse/ – Vijay Apr 12 '15 at 05:19
-
I've seen your answer, tried it, but gut stuck reading details of the request, could you please have a look here http://stackoverflow.com/q/37256836/4142984 to clear my confusion or to add more info? Thanks in advance! – Gyro Gearloose May 17 '16 at 16:36
5
Axis 2 has a simple standalone server (see http://ws.apache.org/axis2/1_4_1/installationguide.html)

Vinze
- 2,549
- 3
- 22
- 23