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
/metroas 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-propCLI command to set itsclass-path-prefixproperty to the jar files underMETRO_HOME/libdirectory.
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 toolwadm, please refer to the first two sections of my SDN article on SJS Web Server.
Note: When you setclass-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) forclass-path-prefixvalue.
- Set
METRO_HOMEenvironment variable. For example,
bash$export METRO_HOME=USER_DIR/metro
- Build the war file.
$cd METRO_HOME/samples/mtom
$ant server
This target buildsjaxws-mtom.warunderMETRO_HOME/samples/mtom/build/wardirectory.
- 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 athttp://<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.
Posted at 06:28PM Dec 06, 2007 by kmeduri in Sun | Comments[1]
Posted by Vivek Pandey's Blog on December 07, 2007 at 11:53 AM PST #