Tango on Jetty
Posted by arungupta on May 23, 2007 at 3:50 PM PDT
![]() |
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"?><br>
<br>
<project name="WSIT 1.0 Beta On Jetty" default="help" basedir="."><br>
<property environment="env"/><br>
<property name="jetty.home" value="${env.JETTY_HOME}"/><br>
<property name="jetty.lib.home" value="${jetty.home}/lib"/><br>
<property name="java.home" value="${env.JAVA_HOME}"/><br>
<patternset id="wsit-jars"><br>
<include name="webservices-rt.jar"/><br>
<include name="webservices-tools.jar"/><br>
<include name="webservices-extra.jar"/><br>
<include name="webservices-extra-api.jar"/><br>
<include name="webservices-api.jar"/><br>
</patternset><br>
<br>
<target name="install" description="Install latest WSIT jars on Jetty
6.1.x"><br>
<echo message="Installing WSIT 1.0 Beta on ${jetty.home}
..."/><br>
<br>
<copy toDir="${jetty.lib.home}" overwrite="true"><br>
<fileset dir="lib"><br>
<patternset refid="wsit-jars"/><br>
</fileset><br>
</copy><br>
<echo message="... installation complete."/><br>
</target><br>
<br>
<target name="uninstall" description="Install latest WSIT jars on Jetty
6.1.x"><br>
<delete><br>
<fileset dir="${jetty.lib.home}"><br>
<patternset refid="wsit-jars"/><br>
</fileset><br>
</delete><br>
</target><br>
<br>
<target name="help"><br>
<echo message="install :"/><br>
<echo message=" Installs WSIT 1.0 Beta on Jetty 6.1.x"/><br>
<echo/><br>
<echo message="uninstall: "/><br>
<echo message=" Uninstalls WSIT 1.0 Beta from Jetty 6.1.x"/><br>
<echo/><br>
<echo message="$JETTY_HOME must be set to the installation
directory of Jetty 6.1.x."/><br>
<echo/><br>
<echo message="Usage:"/><br>
<echo message=" ant -f wsit-on-jetty.xml {install,uninstall}"/><br>
</target><br>
</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 '
' and make sure 'Java
EE versionSet Source Level to 1.4' is
unchecked. - Copy the WAR file from the '
dist' directory of your
application such '
' to '\Users\Arun
Gupta\WebApplication1\dist\WebApplication1.warJETTY_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
- 1181 reads






