You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ja...@apache.org on 2005/05/13 13:54:01 UTC

cvs commit: ws-fx/sandesha/config client-config.wsdd server-config.wsdd

jaliya      2005/05/13 04:54:01

  Modified:    sandesha/interop ClientDeploy.wsdd DeployClient.bat
                        DeployService.bat RunSimpleAxisServer.bat
                        RunTCPMon.bat build.xml
               sandesha/interop/org/apache/sandesha/samples/interop
                        SyncPingClient.java
               sandesha/src/org/apache/sandesha RMInitiator.java
               sandesha/src/org/apache/sandesha/client
                        ClientPropertyValidator.java
               sandesha/src/org/apache/sandesha/util PropertyLoader.java
               sandesha/test/org/apache/sandesha SimpleServerImpl.java
  Removed:     sandesha/config client-config.wsdd server-config.wsdd
  Log:
  Refactored the config files for the interops, changed the usage of the commons-discovery-SNAPSHOT.jar to commons-discovery-0.2.jar
  
  Revision  Changes    Path
  1.2       +3 -4      ws-fx/sandesha/interop/ClientDeploy.wsdd
  
  Index: ClientDeploy.wsdd
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/ClientDeploy.wsdd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClientDeploy.wsdd	27 Feb 2005 18:24:45 -0000	1.1
  +++ ClientDeploy.wsdd	13 May 2005 11:54:01 -0000	1.2
  @@ -4,8 +4,7 @@
   <!--      from the same dir that the Axis client will run in    -->
   <!-- This file will be replaced by WSDD once it's ready         -->
   
  -<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"
  -    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  - <handler name="RMSender" type="java:org.apache.sandesha.client.RMSender"/>
  - <transport name="RMTransport" pivot="RMSender"/>
  +<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  +    <handler name="RMSender" type="java:org.apache.sandesha.client.RMSender"/>
  +    <transport name="RMTransport" pivot="RMSender"/>
   </deployment>
  
  
  
  1.5       +3 -2      ws-fx/sandesha/interop/DeployClient.bat
  
  Index: DeployClient.bat
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/DeployClient.bat,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeployClient.bat	2 Mar 2005 14:26:03 -0000	1.4
  +++ DeployClient.bat	13 May 2005 11:54:01 -0000	1.5
  @@ -1,10 +1,10 @@
   @echo off
   set CLASSPATH=%CLASSPATH%;..\lib\addressing-SNAPSHOT.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-1.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-jaxrpc-1.2-RC2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-saaj-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-0.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\commons-logging-1.0.3.jar
   set CLASSPATH=%CLASSPATH%;..\lib\junit-3.8.1.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-wsdl4j-1.2-RC1.jar
  @@ -12,5 +12,6 @@
   set CLASSPATH=%CLASSPATH%;..\lib\xerces.jar
   set CLASSPATH=%CLASSPATH%;..\target\classes
   java org.apache.axis.utils.Admin client ClientDeploy.wsdd
  +
    
    
  \ No newline at end of file
  
  
  
  1.5       +2 -2      ws-fx/sandesha/interop/DeployService.bat
  
  Index: DeployService.bat
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/DeployService.bat,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DeployService.bat	2 Mar 2005 14:26:03 -0000	1.4
  +++ DeployService.bat	13 May 2005 11:54:01 -0000	1.5
  @@ -1,10 +1,10 @@
   @echo off
   set CLASSPATH=%CLASSPATH%;..\lib\addressing-SNAPSHOT.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-1.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-jaxrpc-1.2-RC2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-saaj-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-0.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\commons-logging-1.0.3.jar
   set CLASSPATH=%CLASSPATH%;..\lib\junit-3.8.1.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-wsdl4j-1.2-RC1.jar
  
  
  
  1.5       +2 -2      ws-fx/sandesha/interop/RunSimpleAxisServer.bat
  
  Index: RunSimpleAxisServer.bat
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/RunSimpleAxisServer.bat,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RunSimpleAxisServer.bat	2 Mar 2005 14:26:03 -0000	1.4
  +++ RunSimpleAxisServer.bat	13 May 2005 11:54:01 -0000	1.5
  @@ -1,10 +1,10 @@
   @echo off
   set CLASSPATH=%CLASSPATH%;..\lib\addressing-SNAPSHOT.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-1.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-jaxrpc-1.2-RC2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-saaj-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-0.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\commons-logging-1.0.3.jar
   set CLASSPATH=%CLASSPATH%;..\lib\junit-3.8.1.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-wsdl4j-1.2-RC1.jar
  
  
  
  1.2       +2 -2      ws-fx/sandesha/interop/RunTCPMon.bat
  
  Index: RunTCPMon.bat
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/RunTCPMon.bat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RunTCPMon.bat	2 Mar 2005 14:26:03 -0000	1.1
  +++ RunTCPMon.bat	13 May 2005 11:54:01 -0000	1.2
  @@ -1,10 +1,10 @@
   @echo off
   set CLASSPATH=%CLASSPATH%;..\lib\addressing-SNAPSHOT.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\axis-ant-1.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-jaxrpc-1.2-RC2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-saaj-1.2-RC2.jar
  -set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-SNAPSHOT.jar
  +set CLASSPATH=%CLASSPATH%;..\lib\commons-discovery-0.2.jar
   set CLASSPATH=%CLASSPATH%;..\lib\commons-logging-1.0.3.jar
   set CLASSPATH=%CLASSPATH%;..\lib\junit-3.8.1.jar
   set CLASSPATH=%CLASSPATH%;..\lib\axis-wsdl4j-1.2-RC1.jar
  
  
  
  1.6       +0 -1      ws-fx/sandesha/interop/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml	10 May 2005 16:27:53 -0000	1.5
  +++ build.xml	13 May 2005 11:54:01 -0000	1.6
  @@ -275,7 +275,6 @@
           </ant-->
           <copy todir="${build.interop}">
               <fileset dir="${dir.interop}" includes="client-config.wsdd"/>
  -            <fileset dir="${dir.config}" includes="client-listener-config.wsdd"/>
               <fileset dir="${dir.config}" includes="sandesha.properties"/>
           </copy>
   
  
  
  
  1.9       +7 -3      ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/SyncPingClient.java
  
  Index: SyncPingClient.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/SyncPingClient.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SyncPingClient.java	9 May 2005 12:33:14 -0000	1.8
  +++ SyncPingClient.java	13 May 2005 11:54:01 -0000	1.9
  @@ -43,15 +43,19 @@
               Service service = new Service();
               Call call = (Call) service.createCall();
   
  +            //By setting the SYNC property as true and false, the user can select between
  +            //the synchronous version and asynchronous version of invocations.
               call.setProperty(Constants.ClientProperties.SYNC, new Boolean(true));
  +
  +            //Sandesha uses action to differentitiate services initially (when there are no
  +            //sequence identifiers are available. This is a REQUIRED option for Sandesha.
               call.setProperty(Constants.ClientProperties.ACTION, "urn:wsrm:Ping");
   
  -            call.setProperty(Constants.ClientProperties.ACKS_TO,
  -                    Constants.WSA.NS_ADDRESSING_ANONYMOUS);
  +            //This line is used to set the transport for Sandesha
  +            call.setTransport(new RMTransport(targetURL, ""));
   
               call.setTargetEndpointAddress(targetURL);
               call.setOperationName(new QName("http://tempuri.org/", "Ping"));
  -            call.setTransport(new RMTransport(targetURL, ""));
   
               call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN);
   
  
  
  
  1.15      +6 -6      ws-fx/sandesha/src/org/apache/sandesha/RMInitiator.java
  
  Index: RMInitiator.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/RMInitiator.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- RMInitiator.java	8 May 2005 19:12:22 -0000	1.14
  +++ RMInitiator.java	13 May 2005 11:54:01 -0000	1.15
  @@ -18,6 +18,7 @@
   
   import org.apache.axis.Handler;
   import org.apache.axis.SimpleChain;
  +import org.apache.axis.client.Call;
   import org.apache.axis.components.logger.LogFactory;
   import org.apache.axis.configuration.SimpleProvider;
   import org.apache.axis.description.JavaServiceDesc;
  @@ -31,8 +32,6 @@
   import org.apache.sandesha.util.PropertyLoader;
   import org.apache.sandesha.ws.rm.providers.RMProvider;
   
  -import javax.xml.parsers.DocumentBuilder;
  -import javax.xml.parsers.DocumentBuilderFactory;
   import java.net.ServerSocket;
   import java.util.ArrayList;
   import java.util.Iterator;
  @@ -118,7 +117,7 @@
               }
           }
   
  -        if (listenerStarted){
  +        if (listenerStarted) {
               sas.stop();
               
               
  @@ -154,8 +153,9 @@
               SOAPService rmService = new SOAPService(reqHandlers, rmp, resHandlers);
   
               JavaServiceDesc desc = new JavaServiceDesc();
  -            rmService.setOption(Constants.ClientProperties.CLASS_NAME, Constants.ClientProperties.RMSERVICE_CLASS);
  -            rmService.setOption(Constants.ClientProperties.ALLOWED_METHODS,Constants.ASTERISK);
  +            rmService.setOption(Constants.ClientProperties.CLASS_NAME,
  +                    Constants.ClientProperties.RMSERVICE_CLASS);
  +            rmService.setOption(Constants.ClientProperties.ALLOWED_METHODS, Constants.ASTERISK);
   
               desc.setName(Constants.ClientProperties.RMSERVICE);
               rmService.setServiceDescription(desc);
  @@ -219,5 +219,5 @@
           return getHandlerChain(arr);
       }
   
  -
  +  
   }
  \ No newline at end of file
  
  
  
  1.20      +2 -1      ws-fx/sandesha/src/org/apache/sandesha/client/ClientPropertyValidator.java
  
  Index: ClientPropertyValidator.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/client/ClientPropertyValidator.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ClientPropertyValidator.java	7 May 2005 08:14:44 -0000	1.19
  +++ ClientPropertyValidator.java	13 May 2005 11:54:01 -0000	1.20
  @@ -30,6 +30,7 @@
    * @author Jaliya
    */
   public class ClientPropertyValidator {
  +    private static long messageNumber=0;
   
       public static RMMessageContext validate(Call call) throws AxisFault {
   
  @@ -169,7 +170,7 @@
           long msgNumber = 0;
           if (temp != null)
               msgNumber = ((Long) temp).longValue();
  -        return msgNumber;
  +        return messageNumber++;
       }
   
       private static boolean getLastMessage(Call call) {
  
  
  
  1.9       +6 -4      ws-fx/sandesha/src/org/apache/sandesha/util/PropertyLoader.java
  
  Index: PropertyLoader.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/src/org/apache/sandesha/util/PropertyLoader.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PropertyLoader.java	7 Mar 2005 13:13:47 -0000	1.8
  +++ PropertyLoader.java	13 May 2005 11:54:01 -0000	1.9
  @@ -37,7 +37,8 @@
       public static int getSimpleAxisServerPort() {
           Properties prop = loadProperties();
           if (prop != null) {
  -            return new Integer(prop.getProperty(Constants.ClientProperties.SIMPLE_AXIS_SERVER_PORT_POPERTY)).intValue();
  +            return new Integer(
  +                    prop.getProperty(Constants.ClientProperties.SIMPLE_AXIS_SERVER_PORT_POPERTY)).intValue();
           } else
               return Constants.DEFAULT_SIMPLE_AXIS_SERVER_PORT;
   
  @@ -46,7 +47,8 @@
       private static Properties loadProperties() {
           Properties properties = new Properties();
           try {
  -            InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(Constants.ClientProperties.PROPERTY_FILE);
  +            InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(
  +                    Constants.ClientProperties.PROPERTY_FILE);
               properties.load(in);
               return properties;
           } catch (IOException e) {
  @@ -55,7 +57,6 @@
           }
       }
   
  -
       //CHANGE FOR SECURITY ADDITION
       public static ArrayList getRequestHandlerNames() {
           return getHandlerNames(Constants.ClientProperties.REQUEST_HANDLER);
  @@ -70,7 +71,8 @@
           ArrayList ret = new ArrayList();
   
           try {
  -            InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(Constants.ClientProperties.PROPERTY_FILE);
  +            InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(
  +                    Constants.ClientProperties.PROPERTY_FILE);
               properties.load(in);
   
               int temp = 0;
  
  
  
  1.5       +2 -27     ws-fx/sandesha/test/org/apache/sandesha/SimpleServerImpl.java
  
  Index: SimpleServerImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/sandesha/test/org/apache/sandesha/SimpleServerImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SimpleServerImpl.java	11 Apr 2005 02:58:55 -0000	1.4
  +++ SimpleServerImpl.java	13 May 2005 11:54:01 -0000	1.5
  @@ -1,24 +1,9 @@
   package org.apache.sandesha;
   
  -import java.io.File;
  -import java.net.ServerSocket;
  -import java.util.Iterator;
  -
  -import javax.xml.parsers.DocumentBuilder;
  -import javax.xml.parsers.DocumentBuilderFactory;
  -import javax.xml.namespace.QName;
  -
  -import org.apache.axis.deployment.wsdd.WSDDDeployment;
  -import org.apache.axis.deployment.wsdd.WSDDDocument;
   import org.apache.axis.transport.http.SimpleAxisServer;
  -import org.apache.axis.handlers.soap.SOAPService;
  -import org.apache.axis.EngineConfiguration;
  -import org.apache.axis.AxisEngine;
  -import org.apache.axis.description.JavaServiceDesc;
  -import org.apache.axis.server.AxisServer;
  -import org.apache.sandesha.ws.rm.providers.RMProvider;
   import org.apache.sandesha.util.PropertyLoader;
  -import org.w3c.dom.Document;
  +
  +import java.net.ServerSocket;
   
   public class SimpleServerImpl {
   
  @@ -26,16 +11,6 @@
   
           try {
               SimpleAxisServer sas = new SimpleAxisServer();
  -//            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  -//            dbf.setNamespaceAware(true);
  -//            DocumentBuilder db = dbf.newDocumentBuilder();
  -//
  -//            Document doc = db.parse(new File("config/server-config.wsdd"));
  -//            WSDDDocument wsdddoc = new WSDDDocument(doc);
  -//            WSDDDeployment wsdddep = wsdddoc.getDeployment();
  -//            sas.setMyConfig(wsdddep);
  -//            sas.getMyConfig().configureEngine(new AxisServer());
  -
               sas.setServerSocket(new ServerSocket(PropertyLoader.getSimpleAxisServerPort()));
               Thread serverThread = new Thread(sas);
               serverThread.start();