You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/04/19 13:16:16 UTC

svn commit: r530380 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java

Author: dims
Date: Thu Apr 19 04:16:14 2007
New Revision: 530380

URL: http://svn.apache.org/viewvc?view=rev&rev=530380
Log:
support custom servlet mapping which mat have extra slashes like /WSDLHandlerService/jaxws/GetTrackerData

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java?view=diff&rev=530380&r1=530379&r2=530380
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java Thu Apr 19 04:16:14 2007
@@ -48,6 +48,8 @@
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import java.io.File;
@@ -55,6 +57,8 @@
 import java.util.Iterator;
 
 public class Utils {
+    private static final Log log = LogFactory.getLog(Utils.class);
+
     public static void addHandler(Flow flow, Handler handler, String phaseName) {
         HandlerDescription handlerDesc = new HandlerDescription();
         PhaseRule rule = new PhaseRule(phaseName);
@@ -168,6 +172,8 @@
      *         the path after the first element. all ? parameters are discarded.
      */
     public static String[] parseRequestURLForServiceAndOperation(String path, String servicePath) {
+        //FIXME TODO : lower the log level to debug
+        log.info("parseRequestURLForServiceAndOperation : ["+ path +"]["+ servicePath +"]");
         if (path == null) {
             return null;
         }
@@ -194,10 +200,16 @@
                 if (operationIndex > 0) {
                     values[0] = service.substring(0, operationIndex);
                     values[1] = service.substring(operationIndex + 1);
+                    operationIndex = values[1].lastIndexOf('/');
+                    if (operationIndex > 0){
+                        values[1] = values[1].substring(operationIndex + 1);
+                    }
                 } else {
                     values[0] = service;
                 }
             }
+        } else {
+            log.info("Unable to parse request URL ["+ path +"]["+ servicePath +"]");
         }
 
         return values;



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