javaweb-servicesjax-wsjax-ws-customization

Is it possible to create JAX-WS Service in JAR and not in WAR?


I'm new to Java so I may be misunderstanding some of nouns - I hope I'll get it right.

We are creating an extension to a third party software which loads our JAR dynamically. As part of the implementation, the extension should have a service endpoint (I think servlet is right noun) waiting for requests from my company's backend servers.

The entire solution should run on Websphere (probably 7.0).

I'm looking for a way to open a service endpoint without creating a WAR file. The reason I don't want the WAR is because our JAR is loaded dynamically and I'm not convinced that the third party system will be able to load the WAR. In addition, I afraid that by creating a WAR I'll basically create a new application which will not have access to the objects allocated in the host process of our extension.

Is that doable?

Thanks,

Nadav


Solution

  • Yes you can, just use Enpoint.publish() method comes with JDK itself. Please look at the link Publishing a WS with Jax-WS Endpoint