Miles to go ...

Arun Gupta is a Technology Evangelist for Web Services and Web 2.0 Apps at Sun. He was the spec lead for APIs in the Java platform, committer in multiple Open Source projects, participated in standard bodies and contributed to Java EE and SE releases.
« JavaOne 2007 slides... | Main | Misc Photography... »

http://blogs.sun.com/arungupta/date/20070523 Wednesday May 23, 2007

Tango on Jetty

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

del.icio.us | furl | simpy | slashdot | technorati | digg
Comments:

Here is how to configure Jetty for hot deployment: http://docs.codehaus.org/display/JETTY/ContextDeployer

Posted by Fabian Ritzmann on May 24, 2007 at 12:52 AM PDT #

Thanks for the pointer. I wonder though why it's not the default.

Posted by Arun on May 29, 2007 at 09:42 AM PDT #

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

Posted by Arun Gupta's Blog on June 19, 2007 at 11:37 AM PDT #

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

Posted by Arun Gupta's Blog on November 20, 2007 at 03:13 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
« JavaOne 2007 slides... | Main | Misc Photography... »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.

--> ajax ajaxworld conf eclipse fitness gem glassfish glassfishday hyderabad india indigo interoperability javaone javaone2008 jax-ws jmaki jpa jruby mac marathon metro microsoft mysql netbeans phobos photography presos railsconf ruby rubyonrails running runninglog runsfm screencast siliconvalleymarathon sun suntechdays swdp tango theserverside totd training traveltips v3 vista wcf web2.0 webservices webtier windows wsaddressing wsit youtube
Locations of visitors to this page

calendar

« September 2008
SunMonTueWedThuFriSat
 
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
www.flickr.com
This is a Flickr badge showing public photos from ArunGupta. Make your own badge here.
Add to Technorati Favorites

Last 50