axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r387900 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/transport/http/ core/src/org/apache/axis2/transport/tcp/ samples/ samples/src/sample/sgccalculator/ tool/script/
Date Wed, 22 Mar 2006 17:37:12 GMT
Author: deepal
Date: Wed Mar 22 09:37:09 2006
New Revision: 387900

URL: http://svn.apache.org/viewcvs?rev=387900&view=rev
Log:
-fixing TCPServer problem
-Fixing Service group sample
-fixing bugs in DeploymentEngine.java
-fixed tcp-server.bat

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
    webservices/axis2/trunk/java/modules/samples/maven.xml
    webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java
    webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=387900&r1=387899&r2=387900&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
Wed Mar 22 09:37:09 2006
@@ -27,12 +27,7 @@
 import org.apache.axis2.deployment.scheduler.SchedulerTask;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.AxisModule;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.axis2.description.Flow;
-import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Phase;
 import org.apache.axis2.i18n.Messages;
@@ -42,14 +37,7 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
+import java.io.*;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -99,12 +87,28 @@
 
     public DeploymentEngine(String repositoryName, String xmlFile)
             throws DeploymentException {
+
         if ((repositoryName == null || "".equals(repositoryName.trim())) &&
                 (xmlFile == null || "".equals(xmlFile.trim()))) {
             String axis2_home = System.getProperty(Constants.AXIS2_HOME);
-            if (axis2_home != null && !"".equals("")) {
-                useDefault = false;
-                axis2repository = axis2_home;
+            if (axis2_home != null && !"".equals(axis2_home)) {
+                File axisRepo = new File(axis2_home);
+                if (!axisRepo.exists()) {
+                    throw new DeploymentException(
+                            Messages.getMessage("cannotfindrepo", axis2repository));
+                }
+                File axis2conf = new File(axisRepo, "conf");
+                if (axis2conf.exists()) {
+                    File axis2xml = new File(axis2conf, "axis2.xml");
+                    if (!axis2xml.exists()) {
+                        useDefault = true;
+                    } else {
+                        useDefault = false;
+                    }
+                } else {
+                    useDefault = true;
+                    axis2repository = axis2_home;
+                }
             } else {
                 useDefault = true;
                 axis2repository = null;
@@ -311,8 +315,9 @@
      * called the init method since there is no refernce to configuration context
      * so who ever create module usieng this has to called module.init if it is
      * required
-     * @param modulearchive  : Actual module archive file
-     * @param config : AxisConfiguration : for get classs loders etc..
+     *
+     * @param modulearchive : Actual module archive file
+     * @param config        : AxisConfiguration : for get classs loders etc..
      * @return
      * @throws DeploymentException
      */
@@ -564,14 +569,14 @@
             }
             return axisConfig;
         } else {
-            InputStream in=null;
+            InputStream in = null;
             try {
                 in = new FileInputStream(axis2_xml_file_name);
                 populateAxisConfiguration(in);
             } catch (FileNotFoundException e) {
                 throw new DeploymentException(e);
             } finally {
-                if (in!=null) {
+                if (in != null) {
                     try {
                         in.close();
                     } catch (IOException e) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java?rev=387900&r1=387899&r2=387900&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
Wed Mar 22 09:37:09 2006
@@ -55,8 +55,8 @@
     private static final long serialVersionUID = -2085869393709833372L;
     public static final String CONFIGURATION_CONTEXT = "CONFIGURATION_CONTEXT";
     public static final String SESSION_ID = "SessionId";
-    protected ConfigurationContext configContext;
-    protected AxisConfiguration axisConfiguration;
+    protected transient ConfigurationContext configContext;
+    protected transient AxisConfiguration axisConfiguration;
     protected ListingAgent lister;
 
     protected MessageContext createAndSetInitialParamsToMsgCtxt(Object sessionContext,

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java?rev=387900&r1=387899&r2=387900&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
Wed Mar 22 09:37:09 2006
@@ -109,6 +109,7 @@
             System.out.println("[Axis2] Using the Repository " + repository.getAbsolutePath());
             System.out.println("[Axis2] Starting the TCP Server on port " + args[1]);
             tcpServer.start();
+            Runtime.getRuntime().addShutdownHook(new Thread(tcpServer));
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/samples/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/maven.xml?rev=387900&r1=387899&r2=387900&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/samples/maven.xml Wed Mar 22 09:37:09 2006
@@ -325,7 +325,7 @@
                 <ant:include name="sample/sgccalculator/**"/>
             </ant:fileset>
         </ant:copy>
-        <jar destfile="${samples.dir}/SGCCalculator/SGCCalculator.jar">
+        <jar destfile="${samples.dir}/SGCCalculator/SGCCalculator.aar">
             <fileset dir="target/classes">
                 <include name="sample/sgccalculator/**"/>
             </fileset>
@@ -333,6 +333,15 @@
                 <include name="META-INF/**"/>
             </fileset>
         </jar>
+         <jar destfile="${samples.dir}/SGCCalculator/SGCCalculator.jar">
+            <fileset dir="target/classes">
+                <include name="sample/sgccalculator/**"/>
+            </fileset>
+            <fileset dir="src/sample/sgccalculator/">
+                <include name="META-INF/**"/>
+            </fileset>
+        </jar>
+
       <copy toDir="${samples.dir}/SGCCalculator"
             file="script/SGCCalculator/run.bat"/>
         <copy toDir="${samples.dir}/SGCCalculator"

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java?rev=387900&r1=387899&r2=387900&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java
(original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java
Wed Mar 22 09:37:09 2006
@@ -104,7 +104,9 @@
                 System.out.println("Invoking...");
 
                 ServiceClient serviceClient = new ServiceClient();
+                serviceClient.engageModule(new QName("addressing"));
                 serviceClient.setOptions(options);
+                options.setAction("urn:" + opStr);
                 MessageContext requetMessageContext = new MessageContext();
                 requetMessageContext.setEnvelope(getRequestEnvelope(opStr, param1, param2,
                         serviceGroupContextId));

Modified: webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat?rev=387900&r1=387899&r2=387900&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat (original)
+++ webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat Wed Mar 22 09:37:09 2006
@@ -55,6 +55,6 @@
 echo Using JAVA_HOME:    %JAVA_HOME%
 set _RUNJAVA="%JAVA_HOME%\bin\java"
 
-%_RUNJAVA% %JAVA_OPTS% -cp %AXIS2_CLASS_PATH% org.apache.axis2.transport.tcp.TCPServer %*
+%_RUNJAVA% %JAVA_OPTS% -cp %AXIS2_CLASS_PATH% org.apache.axis2.transport.tcp.TCPServer %AXIS2_HOME%
6060 %*
 endlocal
 :end



Mime
View raw message