tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r572360 - in /incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main: java/org/apache/tuscany/sca/binding/ws/axis2/ resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/
Date Mon, 03 Sep 2007 15:10:15 GMT
Author: antelder
Date: Mon Sep  3 08:10:14 2007
New Revision: 572360

URL: http://svn.apache.org/viewvc?rev=572360&view=rev
Log:
More ?wsdl changes including a fix for TUSCANY-1652

Modified:
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java?rev=572360&r1=572359&r2=572360&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
Mon Sep  3 08:10:14 2007
@@ -33,9 +33,9 @@
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.deployment.util.Utils;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -57,7 +57,6 @@
 import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 
 public class Axis2ServiceProvider {
@@ -119,7 +118,6 @@
         Axis2ServiceServlet servlet = new Axis2ServiceServlet();
         servlet.init(configContext);
         String servletURI = wsBinding.getURI();
-        configContext.setContextRoot(servletURI);
         servletHost.addServletMapping(servletURI, servlet);
     }
 

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java?rev=572360&r1=572359&r2=572360&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceServlet.java
Mon Sep  3 08:10:14 2007
@@ -22,6 +22,7 @@
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.SocketException;
+import java.net.URI;
 import java.net.URL;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -35,13 +36,13 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.axis2.transport.http.server.HttpUtils;
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.transport.http.AxisServlet;
 import org.apache.axis2.transport.http.ListingAgent;
+import org.apache.axis2.transport.http.server.HttpUtils;
 
 /**
  * This overrides the servlet init of the AxisServlet so Tuscany can use
@@ -287,28 +288,11 @@
             }
         }
 
-        String cp = configContext.getServiceContextPath();
-        if (cp.endsWith("_null_")) {
-            cp = cp.substring(0, cp.length()-6);    
-        }
-        if (!serviceName.startsWith("/")) {
-            serviceName = "/" + serviceName;
-        }
-        String name;
-        if (cp.equals("/")) {
-            name = serviceName;
-        } else {
-            name = cp + serviceName;
-        }
+        String contextPath = configContext.getServiceContextPath();
 
-        EndpointReference endpoint =
-            new EndpointReference("http://" + ip
-                + ":"
-                + port
-                + (name.startsWith("/")? "" : "/")
-                + name);
+        URI epURI = URI.create("http://" + ip + ":" + port + "/" + contextPath + "/" + serviceName).normalize();
 
-        return new EndpointReference[]{endpoint};
+        return new EndpointReference[]{new EndpointReference(epURI.toString())};
     }
     
 }

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java?rev=572360&r1=572359&r2=572360&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
Mon Sep  3 08:10:14 2007
@@ -283,8 +283,12 @@
             } else {
                 int i = filePart.indexOf(contextRoot) + contextRoot.length();
                 int j = filePart.lastIndexOf(serviceName);
-                String mapping = filePart.substring(i+1, j);
-                configContext.setServicePath(mapping);
+                if (i==j) {
+                    configContext.setServicePath("/");
+                } else {
+                    String mapping = filePart.substring(i+1, j);
+                    configContext.setServicePath(mapping);
+                }
             }
             configContext.setContextRoot(contextRoot);
         }

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml?rev=572360&r1=572359&r2=572360&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml
(original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml
Mon Sep  3 08:10:14 2007
@@ -62,7 +62,7 @@
     <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be
used to distinguiush those endpoints-->
     <!--In case of a servlet, if you change this you have to manually change the settings
of your servlet container to map this -->
     <!--context path to proper Axis2 servlets-->
-    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="servicePath">/</parameter>-->
     <!--<parameter name="restPath">rest</parameter>-->
 
     <!--==============================================================-->



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message