From 427979b27830954a9c6099d086e46e7ae8e23177 Mon Sep 17 00:00:00 2001 From: Vanjikumaran Date: Tue, 25 Mar 2014 14:24:11 +0530 Subject: [PATCH 1/3] Adding Changes of Malaka Silva This is depend on https://github.com/wso2-dev/wso2-axis2/pull/3 --- .../main/java/org/apache/synapse/endpoints/HTTPEndpoint.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/apache/synapse/endpoints/HTTPEndpoint.java b/modules/core/src/main/java/org/apache/synapse/endpoints/HTTPEndpoint.java index b4f29c7228..ee859f1cdf 100644 --- a/modules/core/src/main/java/org/apache/synapse/endpoints/HTTPEndpoint.java +++ b/modules/core/src/main/java/org/apache/synapse/endpoints/HTTPEndpoint.java @@ -103,7 +103,10 @@ private void processHttpMethod(MessageContext synCtx) { } else if (httpMethod.equalsIgnoreCase(Constants.Configuration.HTTP_METHOD_HEAD)) { synCtx.setProperty(Constants.Configuration.HTTP_METHOD, Constants.Configuration.HTTP_METHOD_HEAD); - } + } else if (httpMethod.equalsIgnoreCase(Constants.Configuration.HTTP_METHOD_PATCH)) { + synCtx.setProperty(Constants.Configuration.HTTP_METHOD, + Constants.Configuration.HTTP_METHOD_PATCH); + } } } From 39b1889c9f0560015c2832585abb3683ac83336e Mon Sep 17 00:00:00 2001 From: "chanakaf@wso2.com" Date: Thu, 27 Mar 2014 11:52:13 +0530 Subject: [PATCH 2/3] Fixing the issue of removing properties at operation scope (fixing the issue ESBJAVA-3048) --- .../synapse/mediators/builtin/PropertyMediator.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java index 6d3b13aa10..489a145bcc 100644 --- a/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java +++ b/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java @@ -19,6 +19,7 @@ package org.apache.synapse.mediators.builtin; +import org.apache.axis2.context.OperationContext; import org.apache.synapse.MessageContext; import org.apache.synapse.SynapseLog; import org.apache.synapse.SynapseException; @@ -195,6 +196,14 @@ public boolean mediate(MessageContext synCtx) { } else { synLog.traceOrDebug("No transport headers found for the message"); } + } else if (XMLConfigConstants.SCOPE_OPERATION.equals(scope) + && synCtx instanceof Axis2MessageContext) { + // Removing transport headers + Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx; + org.apache.axis2.context.MessageContext axis2MessageCtx = + axis2smc.getAxis2MessageContext(); + OperationContext axis2oc = axis2MessageCtx.getOperationContext(); + axis2oc.removeProperty(name); } } synLog.traceOrDebug("End : Property mediator"); From 5f2edc19ed5814929e8f42f0f56e396b82d25ff9 Mon Sep 17 00:00:00 2001 From: "chanakaf@wso2.com" Date: Thu, 27 Mar 2014 11:55:52 +0530 Subject: [PATCH 3/3] Fixing the issue of removing properties at operation scope (fixing the issue ESBJAVA-3048) --- .../org/apache/synapse/mediators/builtin/PropertyMediator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java index 489a145bcc..91ecbca204 100644 --- a/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java +++ b/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java @@ -198,7 +198,7 @@ public boolean mediate(MessageContext synCtx) { } } else if (XMLConfigConstants.SCOPE_OPERATION.equals(scope) && synCtx instanceof Axis2MessageContext) { - // Removing transport headers + // Removing operation scope headers Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx; org.apache.axis2.context.MessageContext axis2MessageCtx = axis2smc.getAxis2MessageContext();