Krishnamohan Meduri's weblog

Thursday Dec 06, 2007

Running Metro on SJS Web Server 7 Update 1

Recently I found that one can run Metro on SJS Web Server 7.0 Update 1 in minutes. If you want to give it a try, following steps would help you get going:

Set up SJS Web Server:

  • Download Metro bundle and unzip it say, under USER_DIR. I will refer to USER_DIR/metro as METRO_HOME.

  • SJS WS 7.0 Update 1 bundles JAX-WS 2.0 libraries. Therefore you need to override them with the latest libraries from Metro. For this, use wadm set-jvm-prop CLI command to set its class-path-prefix property to the jar files under METRO_HOME/lib directory.

    For example,

    $cd WS7_INSTALL_DIR/bin
    $./wadm --user=admin_user --password-file=admin_passwd_file

    wadm> set-jvm-prop --config=<config> class-path-prefix=METRO_HOME/lib/webservices-api.jar: METRO_HOME/lib/webservices-extra-api.jar:METRO_HOME/lib/webservices-extra.jar: METRO_HOME/lib/webservices-rt.jar:METRO_HOME/lib/webservices-tools.jar

    wadm> deploy-config <config>

    For more details on SJS Web Server's administration command line tool wadm, please refer to the first two sections of my SDN article on SJS Web Server.

    Note: When you set class-path-prefix, make sure you don't have one already set. If you already have one set, append its value to the above command so you won't lose it. Use the appropriate path separator (: for unix and ; for windows) for class-path-prefix value.
Run Metro sample (mtom):
  • Set METRO_HOME environment variable. For example,
         bash$export METRO_HOME=USER_DIR/metro

  • Build the war file.

    $cd METRO_HOME/samples/mtom
    $ant server


    This target builds jaxws-mtom.war under METRO_HOME/samples/mtom/build/war directory.

  • Add this web application to the configuration and deploy changes to all instances.

    wadm> add-webapp --config=<config> --vs=<vs> --uri=/jaxws-mtom METRO_HOME/samples/mtom/build/war/jaxws-mtom.war

    wadm> deploy-config <config>


  • Start the instance.

    $cd WS7_INSTALL_DIR/https-<hostname>/bin
    $./startserv


    (At this point, you can find the endpoint details at http://<host>:<port>/jaxws-mtom/mtomsample)

  • Build and run the client.

    $cd METRO_HOME/samples/mtom
    $ant client run


    Note: This client assumes that the server is running on port 8080. If the server port is different, you must modify the port in its build.xml appropriately.


Comments:

[Trackback] Metro is tested to run on Glassfish and any servlet 2.4 compliant container. Krishna has successfully deployed and tested JAX-WS 2.1 web services using Metro 1.1 nightly on SJS Web Server 7 Update 1.

Posted by Vivek Pandey's Blog on December 07, 2007 at 11:53 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Feeds

Search

Links

Navigation

Referrers