Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying JAX-WS web service on Tomcat

After noticing Java 6 includes javax.xml.ws, I'm able to create a standalone web service. How would I go about hosting that in Tomcat 6?

like image 869
nos Avatar asked Nov 16 '09 00:11

nos


People also ask

Does Tomcat support SOAP?

The Apache Tomcat web server is used to deploy and run the Java SOAP service and SOAP-UI is used to test the service operations. The Java SOAP service that is created here represents a simple product catalog and provides methods to search and insert products.


2 Answers

Download metro from here and execute this jar as

java -jar metro-2_0-ea.jar

The metro directory contains two ant files, metro-on-glassfish.xml and metro-on-tomcat.xml. These two files are used to install the Metro binaries into the respective web containers.

The installation process for Tomcat:

  1. shutdown.bat (Tomcat shutdown)

  2. Execute below line on command prompt

ant -Dtomcat.home= -f /metro-on-tomcat.xml install

startup.bat (Tomcat start)

the installation process copies the two Metro jar files into Tomcat's shared/lib directory. No Tomcat configuration files are modified.

like image 121
Isabel Jinson Avatar answered Oct 04 '22 23:10

Isabel Jinson


You will need to download the JAX-WS RI (Reference Implementation) jax-ws.dev.java.net. The https://jax-ws.dev.java.net/nonav/2.1.2m1/docs/samples.html page lists some tips at the bottom of the page on setting up Tomcat for JAX-WS RI.

Specifically for Tomcat 6, you will need to:

Edit $CATALINA_HOME/conf/catalina.properties and set shared.loader={RI Installation Directory}/lib/*.jar. If you are running multiple instances of Tomcat, then edit CATALINA_BASE/conf/catalina.properties for that particular instance. The same technique can be used with Tomcat 5.x if you don't like to copy all the jars to $CATALINA_HOME/shared/lib

like image 38
Courtney Faulkner Avatar answered Oct 04 '22 23:10

Courtney Faulkner