Tango on Jetty
Posted by arungupta on May 23, 2007 at 6:50 PM EDT
![]() |
Web Services Interoperability Technology (WSIT, aka Project Tango), integrated in GlassFish V2 builds, provides a implementation of key enterprise Web services specifications and enables first-class interoperability with .NET 3.0 framework. However if you download stand-alone WSIT builds, then you can also install similar bits on Tomcat 5.5.17. In this entry, I provide a script that allows you to install the same bits on Jetty 6.1.0. |
- Download WSIT Milestone 4 and J2SE 5.0 U2 or later.
- Install (detailed
instructions) the bundle by giving the following command:
java -jar wsit-1_0-fcs-bin-b14-09_apr_2007.jar - Copy the script below in '
jax-ws-latest-wsit' directory and name it as 'wsit-on-jetty.xml':
<?xml version="1.0"?>
<project name="WSIT 1.0 Beta On Jetty" default="help" basedir=".">
<property environment="env"/>
<property name="jetty.home" value="${env.JETTY_HOME}"/>
<property name="jetty.lib.home" value="${jetty.home}/lib"/>
<property name="java.home" value="${env.JAVA_HOME}"/>
<patternset id="wsit-jars">
<include name="webservices-rt.jar"/>
<include name="webservices-tools.jar"/>
<include name="webservices-extra.jar"/>
<include name="webservices-extra-api.jar"/>
<include name="webservices-api.jar"/>
</patternset>
<target name="install" description="Install latest WSIT jars on Jetty 6.1.x">
<echo message="Installing WSIT 1.0 Beta on ${jetty.home} ..."/>
<copy toDir="${jetty.lib.home}" overwrite="true">
<fileset dir="lib">
<patternset refid="wsit-jars"/>
</fileset>
</copy>
<echo message="... installation complete."/>
</target>
<target name="uninstall" description="Install latest WSIT jars on Jetty 6.1.x">
<delete>
<fileset dir="${jetty.lib.home}">
<patternset refid="wsit-jars"/>
</fileset>
</delete>
</target>
<target name="help">
<echo message="install :"/>
<echo message=" Installs WSIT 1.0 Beta on Jetty 6.1.x"/>
<echo/>
<echo message="uninstall: "/>
<echo message=" Uninstalls WSIT 1.0 Beta from Jetty 6.1.x"/>
<echo/>
<echo message="$JETTY_HOME must be set to the installation directory of Jetty 6.1.x."/>
<echo/>
<echo message="Usage:"/>
<echo message=" ant -f wsit-on-jetty.xml {install,uninstall}"/>
</target>
</project> - Download and install (basically unzip the downloaded file) Jetty 6.1.0. Set an environment variable JETTY_HOME pointing to the location of Jetty install directory.
- Invoke the command to install WSIT M4 bits on Jetty as:
ant -f wsit-on-jetty.xml install - Create a
Reliable WSIT endpoint by choosing '
J2EE 1.4' as the 'Java EE version' and make sure 'Set Source Level to 1.4' is unchecked. - Copy the WAR file from the '
dist' directory of your application such '\Users\Arun Gupta\WebApplication1\dist\WebApplication1.war' to 'JETTY_HOME/webapps'. - Start Jetty instance using the following command:
java -jar start.jar etc/jetty.xml
It's weird that 'bin' directory contains only 'jetty.sh' (no.batscript) and the only way documented to run is using this command. - The endpoint should now be available at: '
http://localhost:8080/<context-root>/<service-name>?WSDL', for example 'http://localhost:8080/WebApplication1/HelloService?WSDL'. Note, Jetty does not seem to support hot deployment. So if you drop a WAR file in 'webapps' directory then you need to re-start your Jetty instance.

- A Web service client to this endpoint can be easily generated following
#ws2 screencast.

This is one trivial sample. If you try other interesting combinations and they don't work, please file an issue.
Technorati: wsit glassfish webservices jetty
Related Topics >>
Blog Links >>
- Login or register to post comments
- Printer-friendly version
- arungupta's blog
- 1069 reads






