[mashup-dev] svn commit r15472 - trunk/mashup/java/modules/core/src/org/wso2/mashup/transport

svn at wso2.org svn at wso2.org
Wed Apr 2 00:01:00 PDT 2008


Author: keith
Date: Wed Apr  2 00:00:57 2008
New Revision: 15472

Log:

Fixing the Filter to handle service endpoints of the form serviceName.endpoint name



Modified:
   trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/ServiceUIFilter.java

Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/ServiceUIFilter.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/ServiceUIFilter.java	(original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/ServiceUIFilter.java	Wed Apr  2 00:00:57 2008
@@ -124,7 +124,20 @@
 
                     try {
                         if (indexOfDot != -1) {
-                            isFile = requestPath.substring(indexOfDot).matches("\\.(.)*");
+                            String subString = requestPath.substring(indexOfDot);
+                            isFile = subString.matches("\\.(.)*");
+
+                            // Checking weather the request is of the form serviceName.endpointName if so its a false allarm
+                            if (requestPath.length() > indexOfDot +1) {
+                                int indexOfSlash = subString.indexOf("/");
+                                if (indexOfSlash != -1) {
+                                    String endpointName = subString.substring(1, indexOfSlash);
+                                    if (axisService.getEndpoint(endpointName)!= null) {
+                                        isFile = subString.substring(indexOfDot +1).matches("\\.(.)*");
+                                    }
+                                }
+                            }
+
                         }
 
                         //Retrieve the resources folder. JSDeployer make sure to put this parameter.



More information about the Mashup-dev mailing list