X

Tango on Jetty

Guest Author






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.


  1. Download


    WSIT Milestone 4
    and

    J2SE 5.0 U2 or later.

  2. Install (detailed

    instructions
    ) the bundle by giving the following command:



    java -jar wsit-1_0-fcs-bin-b14-09_apr_2007.jar

  3. 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>

  4. 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.

  5. Invoke the command to install WSIT M4 bits on Jetty as:



    ant -f wsit-on-jetty.xml install

  6. 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.

  7. Copy the WAR file from the 'dist directory of your

    application such '\\Users\\Arun

    Gupta\\WebApplication1\\dist\\WebApplication1.war to 'JETTY_HOME/webapps.

  8. 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 .bat script) and the only way

    documented to

    run is using this command.

  9. 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.




  10. 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

Join the discussion

Comments ( 5 )
  • Fabian Ritzmann Thursday, May 24, 2007
    Here is how to configure Jetty for hot deployment:
    http://docs.codehaus.org/display/JETTY/ContextDeployer
  • Arun Tuesday, May 29, 2007
    Thanks for the pointer. I wonder though why it's not the default.
  • Arun Gupta's Blog Tuesday, June 19, 2007
    [Trackback] The GlassFish V2 Web services stack consists of JAX-WS as the core platform and Project Tango (aka Web Services Interoperability Technology, WSIT) as an implementation of key WS-\* specifications on top of it. This stack, so far referred as &quot;JAX-WS...
  • Arun Gupta's Blog Tuesday, November 20, 2007
    [Trackback] I presented on Metro and jMaki in an invitation-only gathering in Seattle on Nov 15. The audience in both the sessions was pretty interactive. Even though the sessions were invitation-only, I'm posting some of the questions asked during the...
  • LAPTOP BATTERY Thursday, November 27, 2008

    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.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.