Differences between revisions 4 and 5
Revision 4 as of 2004-10-06 14:17:25
Size: 6281
Comment:
Revision 5 as of 2009-09-20 22:48:34
Size: 6281
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

How to configure Sandesha

Sandesha configuration require few steps. Please check whether you have completed the following check list.

  1. Configure Axis in your machine. Assume that you have c:\tomcat in your machine.
  2. Then you have to copy the axis in to the tomcat.
    • Download the lib folder from the Sandesha CVS and copy the jar files to c:\tomcat\webapps\axis\WEB-INF\libs
  3. Check whether the axis is working properly using happy axis service. Just check
    • http//localhost:8080/axis/happyaxis.jsp
  4. Compile the Sandesha code. Here you have to compile all
    • org.apache.sandesha.* classes including org.apache.sandesha.samples.interop.*
  5. Then copy all the classes to the c:\tomcat\webapps\axis\WEB-INF\classes
  6. Copy the classes to a directory where you want to test the scenarios as
  7. Then copy the wsdd files that are there in the following three locations to the c:\SandeshaTest folder.

    1. org.apache.sandesha.client. ClientEndpointManagerDeploy.wsdd b. org.apache.sandesha.samples.interop.ApplicationServiceDeploy.wsdd c. org.apache.sandesha.samples.interop. ClientDeploy.wsdd

  8. Edit the ClientDeploy.wsdd files and the correct machine IP

    • address where necessary
      • e.g. If your tomcat is running in the port 8080 the ClientDeploy.wsdd will be as follows.

 <!-- Use this file to deploy some handlers/chains and services  -->
 <!-- on the client.  To do this simply run:                     --> 
 <!--   java org.apache.axis.utils.Admin ClientDeploy.wsdd       --> 
 <!--      from the same dir that the Axis client will run in    --> 
 <!-- This file will be replaced by WSDD once it's ready         --> 
 <!-- for the parameters sourceURI and replyTo set suitable value as 
 set --> 
 
 <deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/" 
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 
 <handler name="PingRequestHandler" 
  type="java:org.apache.sandesha.ws.rm.handlers.RMClientRequestHandler">
     <parameter name="sourceURI" value="http://127.0.0.1:8080"/>
     <parameter name="action" value="wsrm:Ping"/>
     <parameter name="synchronized" value="false"/>
     <parameter name="replyTo" value="http://127.0.0.1:8080"/> 
 </handler>
   
 <handler name="EchoStringRequestHandler" 
  type="java:org.apache.sandesha.ws.rm.handlers.RMClientRequestHandler">
     <parameter name="sourceURI" value="http://127.0.0.1:8080"/>
     <parameter name="action" value="wsrm:echoString"/>
     <parameter name="synchronized" value="false"/>
     <parameter name="replyTo" value="http://127.0.0.1:8080"/> 
 </handler>
 
 <handler name="RMClientResponseHandler" 
  type="java:org.apache.sandesha.ws.rm.handlers.RMClientResponseHandler">
 </handler>
 
 <service name="PingService" provider="java:RPC">
     <requestFlow>
        <handler type="PingRequestHandler"/> </requestFlow>
     <responseFlow>
        <handler type="RMClientResponseHandler"/> 
     </responseFlow>
         <parameter name="className"  value="org.apache.sandesha.samples.interop.PingService"/>
         <parameter name="allowedMethods" value="*"/>  
 </service>

 <service name="EchoStringService" provider="java:RPC"> <requestFlow>
    <handler type="EchoStringRequestHandler"/> </requestFlow>
  <responseFlow>
     <handler type="RMClientResponseHandler"/> 
  </responseFlow>
    <parameter name="className"  value="org.apache.sandesha.samples.interop.EchoStringService"/>
    <parameter name="allowedMethods" value="*"/> 
  </service>
 </deployment>
  1. Create the following bat files in the same working directory deploy.bat

 @echo off
 set CATALINA_HOME=C:\OpenSource\Tomcat
 set AXIS_HOME=%CATALINA_HOME%\webapps\AXIS\WEB-INF
 set CLASSPATH=%AXIS_HOME%\lib\axis.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\jaxrpc.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-discovery.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-logging.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\saaj.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\wsdl4j.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\dom.jar
 set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\common\lib\xerces.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%
 set CLASSPATH=%CLASSPATH%;. 
 java org.apache.axis.client.AdminClient ApplicationServiceDeploy.wsdd
 java org.apache.axis.client.AdminClient   ClientEndpointManagerDeploy.wsdd
  • clientdeploy.bat

 @echo off
 set CATALINA_HOME=C:\OpenSource\Tomcat
 set AXIS_HOME=%CATALINA_HOME%\webapps\AXIS\WEB-INF
 set CLASSPATH=%AXIS_HOME%\lib\axis.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\jaxrpc.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-discovery.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-logging.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\saaj.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\wsdl4j.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\dom.jar
 set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\common\lib\xerces.jar
 set CLASSPATH=%CLASSPATH%;. 
 java org.apache.axis.utils.Admin client ClientDeploy.wsdd

test.bat

 @echo off
 set CATALINA_HOME=C:\OpenSource\Tomcat
 set AXIS_HOME=%CATALINA_HOME%\webapps\AXIS\WEB-INF
 set CLASSPATH=%AXIS_HOME%\lib\axis.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\jaxrpc.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-discovery.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-logging.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\saaj.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\wsdl4j.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\dom.jar
 set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\common\lib\xerces.jar
 set CLASSPATH=%CLASSPATH%;%AXIS_HOME%
 set CLASSPATH=%CLASSPATH%;. 
 java org.apache.sandesha.samples.interop.Scenario_1_1_Client
 http://127.0.0.1:8080/axis/services/PingService

10. Run the bat files. You only need to run the first two bat files

  • only for once.

11. Change the class name of the Scenario in the test.bat for different scenarios accordingly.

  • We will be creating a complete documentation for Sandesha soon.

FrontPage/WsFx/sandeshafaq (last edited 2009-09-20 22:48:34 by localhost)