90 likes | 196 Vues
Learn the methods for deploying AXIS2 web services quickly and monitor SOAP messages effortlessly. This guide covers instant deployment, JWS files, and usage of WSDD for easy setup. Ensure proper server-client functions and observe SOAP messages using SOAPMonitor in Tomcat.
E N D
Lab: 1. Deployment with AXIS2. Observe SOAP messages Dr. Yuhong YAN NRC-IIT
Installation • Follow the installation guide
Deployment for AXIS • Instant Deployment and Deployment using WSDD are two methods specific to AXIS engine • If you use other server, the deployment can be different • Deployment is about how to put the code on the server • You need authorization to operate server
How to load code on the server • Server-client functions • ftp • ssh • webDev (a web interface for navigating and managing remote file system from web interface) • If you can operate the file system on the server (that is what we do)
JWS (Java Web Services) Files: Instant Deployment • Copy the *.jws to <your_app_root>/axis/ • The server uses the JDK to compile it, the class file is in WEB-INF/jwsClasses • The service is not listed in server_config.wsdd • Straight forward way for simple web services, almost no overhead to work as a web service. • No package structure • Not for production quality web services
Try the two examples • HelloWorld • No package • Download helloWorld.zip • Put HelloWorldService.jws in %CATALINA_HOME%/webapps/axis • Run TestClient from a command window Java –cp %classpath% TestClient • Calculator • The code is in %AXIS_HOME%/samples/userguide/example2 • Rename Calculator.java to Calculator.jws • Put Calculator.jws in %CATALINA_HOME%/webapps/axis • Run TestClient from a command window Java –cp %classpath% CalcClient
Deploy Web Services Using WSDD <deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="urn:xmltoday-delayed-quotes" provider="java:RPC"> <parameter name="className" value="samples.stock.StockQuoteService"/> <parameter name="allowedMethods" value="getQuote test"/> <parameter name="allowedRoles" value="user1,user2"/> <parameter name="wsdlServicePort" value="GetQuote"/> <requestFlow name="checks"> <handler type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/> <handler type="java:org.apache.axis.handlers.SimpleAuthorizationHandler"/> </requestFlow> </service> </deployment>
Add a service into the services list • Java org.apach.axis.client.AdminClient deploy.wsdd • The command adds the service in deploy.wsdd into server-config.wsdd in %axis_home%/webapps/axis/WEB-INF
Observe SOAP messages • Use the SOAPMonitor • Open the log function in Tomcat