[Carbon-commits] [Carbon] svn commit r92505 - trunk/carbon/components/transport-mgt/org.wso2.carbon.transport.nhttp/src/main/java/org/wso2/carbon/transport/nhttp/api

supun at wso2.com supun at wso2.com
Mon Apr 25 06:53:53 PDT 2011


Author: supun
Date: Mon Apr 25 06:53:53 2011
New Revision: 92505
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=92505

Log:
fixing issue CARBON-8125

Modified:
   trunk/carbon/components/transport-mgt/org.wso2.carbon.transport.nhttp/src/main/java/org/wso2/carbon/transport/nhttp/api/NHttpGetProcessor.java

Modified: trunk/carbon/components/transport-mgt/org.wso2.carbon.transport.nhttp/src/main/java/org/wso2/carbon/transport/nhttp/api/NHttpGetProcessor.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon/components/transport-mgt/org.wso2.carbon.transport.nhttp/src/main/java/org/wso2/carbon/transport/nhttp/api/NHttpGetProcessor.java?rev=92505&r1=92504&r2=92505&view=diff
==============================================================================
--- trunk/carbon/components/transport-mgt/org.wso2.carbon.transport.nhttp/src/main/java/org/wso2/carbon/transport/nhttp/api/NHttpGetProcessor.java	(original)
+++ trunk/carbon/components/transport-mgt/org.wso2.carbon.transport.nhttp/src/main/java/org/wso2/carbon/transport/nhttp/api/NHttpGetProcessor.java	Mon Apr 25 06:53:53 2011
@@ -22,6 +22,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.AxisService;
 import org.apache.axis2.util.XMLUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -35,6 +36,7 @@
 import org.jaxen.SimpleNamespaceContext;
 import org.jaxen.XPath;
 import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils;
 import org.wso2.carbon.core.transports.CarbonHttpRequest;
 import org.wso2.carbon.core.transports.CarbonHttpResponse;
 import org.wso2.carbon.core.transports.HttpGetRequestProcessor;
@@ -217,12 +219,32 @@
                     }
                 }
 
+                String contextPath = cfgCtx.getServiceContextPath();
+                String serviceName = requestUri.substring(requestUri.indexOf(contextPath) +
+                        contextPath.length() + 1);
+
+                AxisService axisService =
+                        cfgCtx.getAxisConfiguration().getServiceForActivation(serviceName);
+                if (axisService == null) {
+                    // Try to see whether the service is available in a tenant
+                    try {
+                        axisService = TenantAxisUtils.getAxisService(serviceName, cfgCtx);
+                    } catch (AxisFault axisFault) {
+                        axisFault.printStackTrace();
+                    }
+                }
+
                 if (queryString != null) {
                     for (String item : getRequestProcessors.keySet()) {
                         if (queryString.indexOf(item) == 0 &&
                                 (queryString.equals(item) ||
                                         queryString.indexOf("&") == item.length() ||
                                         queryString.indexOf("=") == item.length())) {
+                            if ((item.equalsIgnoreCase("wsdl") || item.equalsIgnoreCase("wsdl2")) &&
+                                    axisService == null) {
+                                continue;
+                            }
+
                             try {
                                 processWithGetProcessor(request, response, requestUri,
                                         requestUrl, queryString,


More information about the Carbon-commits mailing list