Author: isudana Date: Sun Jun 2 06:54:45 2019 New Revision: 1860506 URL: http://svn.apache.org/viewvc?rev=1860506&view=rev Log: Fix for SYNAPSE-1107 by Madhawa Gunasekara
Modified: synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java Modified: synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java?rev=1860506&r1=1860505&r2=1860506&view=diff ============================================================================== --- synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java (original) +++ synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java Sun Jun 2 06:54:45 2019 @@ -53,6 +53,10 @@ import java.util.Iterator; */ public class RESTUtil { + private static RequestURIOperationDispatcher requestURIOperationDispatcher = new RequestURIOperationDispatcher(); + private static HTTPLocationBasedDispatcher httpLocationBasedDispatcher = new HTTPLocationBasedDispatcher(); + private static RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher(); + /** * This method will return the URI part for the GET HTTPRequest by converting * the SOAP infoset to the URL-encoded GET format @@ -295,16 +299,11 @@ public class RESTUtil { } public static void dispatchAndVerify(MessageContext msgContext) throws AxisFault { - RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher(); requestDispatcher.invoke(msgContext); AxisService axisService = msgContext.getAxisService(); if (axisService != null) { - HTTPLocationBasedDispatcher httpLocationBasedDispatcher = - new HTTPLocationBasedDispatcher(); httpLocationBasedDispatcher.invoke(msgContext); if (msgContext.getAxisOperation() == null) { - RequestURIOperationDispatcher requestURIOperationDispatcher = - new RequestURIOperationDispatcher(); requestURIOperationDispatcher.invoke(msgContext); }