0

I have earlier used Jersey API to build JSON web services and deploy them on Tomcat/Websphere.

I am now trying to create a JAX-WS SOAP service and I assumed that Tomcat would be involved.

From this tutorial here, it looks like I don't need a web server to run a JAX-WS service!

  1. How come full-fledged web server is not required for JAX-WS which serves data on HTTP?
  2. Is it possible to run the service on Tomcat/Websphere? Update: Found an example here
  3. Are there any disadvantages/advantages of using a proper web server (as compared to the inbuilt endpoint publisher)?

Edited:

  • Are there any disadvantages of using the embedded HttpServer? Will JAX-WS implementation use servlet-pool etc to optimise simultaneous service calls?
  • If it was regular servlets I could use Security filters, Log filters etc. Does endpoint implementation provide alternate mechanism for intercepting requests?
  • Is it ok to use the embedded HttpServer in production?
Teddy
  • 4,009
  • 2
  • 33
  • 55
  • JSE ships with a lightweight embedded http server (in the form of [`HttpServer`](http://docs.oracle.com/javase/7/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html)). `Endpoint` is *not* a server impl – kolossus Feb 24 '15 at 19:48

1 Answers1

0

A web server is required, either an embedded or stand alone. Here the Endpoint class acts as a lightweight embedded HTTP server (or a subset of one at least).

Kayaman
  • 72,141
  • 5
  • 83
  • 121
  • In the article (step no.3), he mentions creating a publisher class with a "main" method. Looks like it needs to be run as "Java Application" on Eclipse. This is the only line in the main method: Endpoint.publish("http://localhost:9999/ws/hello", new HelloWorldImpl()); – Teddy Feb 23 '15 at 08:52
  • Ah missed that. There the `Endpoint` class is acting as an embedded HTTP server (of sorts). – Kayaman Feb 23 '15 at 09:11