Monday, August 08, 2005

Deploy Stock Quote web service which comes with Axis as an sample

=============
Deploy Stock Quote which comes with Axis as an sample
=============

java -cp "$AXISCLASSPATH" org.apache.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd

where deploy.wsdd can be found at axis/samples/stock/deploy.wsdd

To test:
Add “$AXIS_LIB/wsdl4j.jar” to AXISCLASSPATH

export AXISCLASSPATH=$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/log4j-1.2.8.jar:$AXIS_LIB/xml-apis.jar:$AXIS_LIB/xercesImpl.jar:$AXIS_LIB/wsdl4j.jar

java -cp $AXISCLASSPATH org.apache.axis.wsdl.WSDL2Java -o . -Nhttp://localhost:8080/axis/services/stock-wss-01 samples.stock.client http://localhost:8080/axis/services/stock-wss-01?wsdl

Jar up samples/stock/*.class to stockClient.jar
jar -cvf stockClient.jar samples

Linux Run…
[wss4j@fishcake stock]$ java -cp "stockClient.jar:$AXISCLASSPATH" samples.stock.GetQuote -lhttp://localhost:8080/axis/servlet/AxisServlet -uuser1 -wpass1 IBM
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
IBM: 93.3

Windows Run…

C:\axis-bin-1_2beta\axis-1_2beta\samples\stock>set STOCKCLASSPATH
STOCKCLASSPATH=C:\axis-bin-1_2beta\axis-1_2beta\samples\stock\stockClient.jar

C:\axis-bin-1_2beta\axis-1_2beta\samples\stock>java -cp %STOCKCLASSPATH%;%AXISCL
ASSPATH% samples.stock.GetQuote -lhttp://localhost:8080/axis/servlet/AxisServlet
-uuser1 -wpass1 XXX
XXX: 55.25

0 Comments:

Post a Comment

<< Home