9
Lab: 1. Deployment with AXIS 2. Observe SOAP messages Dr. Yuhong YAN NRC-IIT

Lab: 1. Deployment with AXIS 2. Observe SOAP messages Dr. Yuhong YAN NRC-IIT

Embed Size (px)

Citation preview

Page 1: Lab: 1. Deployment with AXIS 2. Observe SOAP messages Dr. Yuhong YAN NRC-IIT

Lab: 1. Deployment with AXIS2. Observe SOAP messages

Dr. Yuhong YANNRC-IIT

Page 2: Lab: 1. Deployment with AXIS 2. Observe SOAP messages Dr. Yuhong YAN NRC-IIT

Installation

• Follow the installation guide

Page 3: Lab: 1. Deployment with AXIS 2. Observe SOAP messages Dr. Yuhong YAN NRC-IIT

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 Dr. Yuhong YAN NRC-IIT

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 Dr. Yuhong YAN NRC-IIT

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 Dr. Yuhong YAN NRC-IIT

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 Dr. Yuhong YAN NRC-IIT

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 Dr. Yuhong YAN NRC-IIT

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 Dr. Yuhong YAN NRC-IIT

Observe SOAP messages

• Use the SOAPMonitor• Open the log function in Tomcat