You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by sa...@apache.org on 2014/07/24 08:57:57 UTC

[2/2] git commit: ODE-1014: Transport receiver changed from SimpleHTTPServer to AxisServletListener in axis2.xml

ODE-1014: Transport receiver changed from SimpleHTTPServer to AxisServletListener in axis2.xml


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/34b4e766
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/34b4e766
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/34b4e766

Branch: refs/heads/master
Commit: 34b4e766b638f3d3c6373ec664d9bc162ab1d416
Parents: 0e3d346
Author: sathwik <sa...@apache.org>
Authored: Thu Jul 24 12:27:19 2014 +0530
Committer: sathwik <sa...@apache.org>
Committed: Thu Jul 24 12:27:19 2014 +0530

----------------------------------------------------------------------
 axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml         |  2 +-
 .../main/java/org/apache/ode/axis2/ODEAxis2Server.java   | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/34b4e766/axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml
----------------------------------------------------------------------
diff --git a/axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml b/axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml
index 831bb2e..f47ebfc 100644
--- a/axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml
+++ b/axis2-war/src/main/webapp/WEB-INF/conf/axis2.xml
@@ -107,7 +107,7 @@
     <!-- Transport Ins -->
     <!-- ================================================= -->
     <transportReceiver name="http"
-                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+                       class="org.apache.axis2.transport.http.AxisServletListener">
         <parameter name="port" locked="false">8080</parameter>
         <!-- Here is the complete list of supported parameters (see example settings further below):
             port: the port to listen on (default 6060)

http://git-wip-us.apache.org/repos/asf/ode/blob/34b4e766/axis2/src/main/java/org/apache/ode/axis2/ODEAxis2Server.java
----------------------------------------------------------------------
diff --git a/axis2/src/main/java/org/apache/ode/axis2/ODEAxis2Server.java b/axis2/src/main/java/org/apache/ode/axis2/ODEAxis2Server.java
index 55dbea6..4287eb2 100644
--- a/axis2/src/main/java/org/apache/ode/axis2/ODEAxis2Server.java
+++ b/axis2/src/main/java/org/apache/ode/axis2/ODEAxis2Server.java
@@ -35,11 +35,13 @@ import javax.wsdl.WSDLException;
 import javax.xml.namespace.QName;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
 import org.apache.axis2.engine.AxisServer;
 import org.apache.axis2.engine.MessageReceiver;
@@ -48,6 +50,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.ode.axis2.hooks.ODEAxisService;
 import org.apache.ode.axis2.util.Axis2UriResolver;
 import org.apache.ode.axis2.util.Axis2WSDLLocator;
+import org.apache.axis2.transport.http.SimpleHTTPServer;
 
 public class ODEAxis2Server extends AxisServer {
     private static final Log log = LogFactory.getLog(ODEAxis2Server.class);
@@ -68,7 +71,9 @@ public class ODEAxis2Server extends AxisServer {
             }
 
             configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2RepoDir, axis2ConfLocation);
-            configContext.getAxisConfiguration().getTransportIn("http").addParameter(new Parameter("port", ""+port));
+            SimpleHTTPServer receiver = new SimpleHTTPServer(configContext, port);
+            TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
+            trsIn.setReceiver(receiver);
         }
 
         public ODEAxis2Server(String odeRootDir, URL axis2xml, URL axis2repository, int port, ODEConfigProperties config) throws Exception {
@@ -82,7 +87,9 @@ public class ODEAxis2Server extends AxisServer {
             }
 
             configContext = ConfigurationContextFactory.createConfigurationContextFromURIs(axis2xml, axis2repository);
-            configContext.getAxisConfiguration().getTransportIn("http").addParameter(new Parameter("port", ""+port));
+            SimpleHTTPServer receiver = new SimpleHTTPServer(configContext, port);
+            TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
+            trsIn.setReceiver(receiver);
         }
 
         public void start() throws AxisFault {