Lab: 1. Deployment with AXIS 2. Observe SOAP messages
-
Upload
josiah-evans -
Category
Documents
-
view
21 -
download
2
description
Transcript of Lab: 1. Deployment with AXIS 2. Observe SOAP messages
![Page 1: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/1.jpg)
Lab: 1. Deployment with AXIS2. Observe SOAP messages
Dr. Yuhong YANNRC-IIT
![Page 2: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/2.jpg)
Installation
• Follow the installation guide
![Page 3: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/3.jpg)
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
![Page 4: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/4.jpg)
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)
![Page 5: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/5.jpg)
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
![Page 6: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/6.jpg)
Try the two examples
• HelloWorld– No package– Download helloWorld.zip– Put HelloWorldService.jws in
%CATALINA_HOME%/webapps/axis– Run TestClient from a command windowJava –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 windowJava –cp %classpath% CalcClient
![Page 7: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/7.jpg)
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>
![Page 8: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/8.jpg)
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
![Page 9: Lab: 1. Deployment with AXIS 2. Observe SOAP messages](https://reader036.fdocuments.in/reader036/viewer/2022082818/56812d9e550346895d92bf30/html5/thumbnails/9.jpg)
Observe SOAP messages
• Use the SOAPMonitor• Open the log function in Tomcat