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?
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.
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:
shutdown.bat (Tomcat shutdown)
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With