tracerSpecificCarrier = new HashMap<>();
- Map headersMap = (Map) ((Axis2MessageContext) synCtx).getAxis2MessageContext()
- .getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);
+ Map headersMap = new ConcurrentHashMap<>((Map) ((Axis2MessageContext) synCtx).getAxis2MessageContext()
+ .getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS));
Object statusCode = ((Axis2MessageContext) synCtx).getAxis2MessageContext().getProperty("HTTP_SC");
Object statusDescription = ((Axis2MessageContext) synCtx).getAxis2MessageContext().getProperty("HTTP_DESC");
// We only need to extract span context from headers when there are trp headers available
if (headersMap == null) {
- headersMap = new HashMap();
+ headersMap = new ConcurrentHashMap();
}
if (isOuterLevelSpan(statisticDataUnit, spanStore)) {
// Extract span context from headers
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java b/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
index 03d5e388c9..aac6c3112e 100644
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
@@ -65,6 +65,8 @@ public abstract class AbstractMediatorFactory implements MediatorFactory {
= new QName(XMLConfigConstants.STATISTICS_ATTRIB_NAME);
protected static final QName PROP_Q
= new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "property");
+ protected static final QName VARIABLE_Q
+ = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "variable");
protected static final QName PROPERTY_GROUP_Q
= new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "propertyGroup");
protected static final QName FEATURE_Q
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java b/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
index 30e2d902c8..49b3a3ff27 100644
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
@@ -102,7 +102,8 @@ public class MediatorFactoryFinder implements XMLToObjectMapper {
CommentMediatorFactory.class,
ForEachMediatorFactory.class,
JSONTransformMediatorFactory.class,
- NTLMMediatorFactory.class
+ NTLMMediatorFactory.class,
+ VariableMediatorFactory.class
};
private final static MediatorFactoryFinder instance = new MediatorFactoryFinder();
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java b/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
index 95053ff14d..174d90511c 100644
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
@@ -76,7 +76,8 @@ public class MediatorSerializerFinder {
CommentMediatorSerializer.class,
ForEachMediatorSerializer.class,
JSONTransformMediatorSerializer.class,
- NTLMMediatorSerializer.class
+ NTLMMediatorSerializer.class,
+ VariableMediatorSerializer.class
};
private final static MediatorSerializerFinder instance = new MediatorSerializerFinder();
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/VariableMediatorFactory.java b/modules/core/src/main/java/org/apache/synapse/config/xml/VariableMediatorFactory.java
new file mode 100644
index 0000000000..4114d4d3b3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/VariableMediatorFactory.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 LLC. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.synapse.config.xml;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.synapse.Mediator;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.mediators.v2.VariableMediator;
+import org.jaxen.JaxenException;
+
+import java.util.Properties;
+import javax.xml.namespace.QName;
+
+/**
+ * Creates a variable mediator through the supplied XML configuration
+ *
+ *
+ * <variable name="string" [action=set/remove] (value="literal" | expression="expression") type="string|integer|JSON"/>
+ *
+ */
+public class VariableMediatorFactory extends AbstractMediatorFactory {
+
+ private static final QName ATT_ACTION = new QName("action");
+ private static final QName ATT_TYPE = new QName("type");
+
+ public Mediator createSpecificMediator(OMElement elem, Properties properties) {
+
+ VariableMediator variableMediator = new VariableMediator();
+ OMAttribute name = elem.getAttribute(ATT_NAME);
+ OMAttribute value = elem.getAttribute(ATT_VALUE);
+ OMAttribute expression = elem.getAttribute(ATT_EXPRN);
+ OMAttribute action = elem.getAttribute(ATT_ACTION);
+ OMAttribute type = elem.getAttribute(ATT_TYPE);
+
+ if (name == null || name.getAttributeValue().isEmpty()) {
+ String msg = "The 'name' attribute is required for the configuration of a variable mediator";
+ log.error(msg);
+ throw new SynapseException(msg);
+ } else if ((value == null && expression == null) &&
+ !(action != null && "remove".equals(action.getAttributeValue()))) {
+ String msg = "'value' or 'expression' attributes is required for a variable mediator when action is SET";
+ log.error(msg);
+ throw new SynapseException(msg);
+ }
+ variableMediator.setName(name.getAttributeValue());
+
+ String dataType = null;
+ if (type != null) {
+ dataType = type.getAttributeValue();
+ }
+
+ if (value != null) {
+ variableMediator.setValue(value.getAttributeValue(), dataType);
+ } else if (expression != null) {
+ try {
+ variableMediator.setExpression(SynapsePathFactory.getSynapsePath(elem, ATT_EXPRN),
+ dataType);
+ } catch (JaxenException e) {
+ String msg = "Invalid expression for attribute 'expression' : " +
+ expression.getAttributeValue();
+ log.error(msg);
+ throw new SynapseException(msg);
+ }
+ }
+
+ if (action != null && "remove".equals(action.getAttributeValue())) {
+ variableMediator.setAction(VariableMediator.ACTION_REMOVE);
+ }
+ processAuditStatus(variableMediator, elem);
+ addAllCommentChildrenToList(elem, variableMediator.getCommentsList());
+ return variableMediator;
+ }
+
+ public QName getTagQName() {
+
+ return VARIABLE_Q;
+ }
+}
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/VariableMediatorSerializer.java b/modules/core/src/main/java/org/apache/synapse/config/xml/VariableMediatorSerializer.java
new file mode 100644
index 0000000000..2c9bc5ced3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/VariableMediatorSerializer.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 LLC. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.synapse.config.xml;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.synapse.Mediator;
+import org.apache.synapse.mediators.v2.VariableMediator;
+
+/**
+ *
+ * <variable name="string" [action=set/remove] (value="literal" | expression="expression") type="string|integer|JSON"/>
+ *
+ */
+public class VariableMediatorSerializer extends AbstractMediatorSerializer {
+
+ public OMElement serializeSpecificMediator(Mediator m) {
+
+ if (!(m instanceof VariableMediator)) {
+ handleException("Unsupported mediator passed in for serialization : " + m.getType());
+ }
+
+ VariableMediator mediator = (VariableMediator) m;
+ OMElement variable = fac.createOMElement("variable", synNS);
+ saveTracingState(variable, mediator);
+
+ if (mediator.getName() != null) {
+ variable.addAttribute(fac.createOMAttribute(
+ "name", nullNS, mediator.getName()));
+ } else {
+ handleException("Invalid variable mediator. Name is required");
+ }
+
+ if (mediator.getValue() != null) {
+ variable.addAttribute(fac.createOMAttribute(
+ "value", nullNS, mediator.getValue().toString()));
+ } else if (mediator.getExpression() != null) {
+ SynapsePathSerializer.serializePath((SynapsePath) mediator.getExpression(),
+ variable, "expression");
+ } else if (mediator.getAction() == VariableMediator.ACTION_SET) {
+ handleException("Invalid variable mediator. Value or expression is required if " +
+ "action is SET");
+ }
+
+ if (mediator.getAction() == VariableMediator.ACTION_REMOVE) {
+ variable.addAttribute(fac.createOMAttribute(
+ "action", nullNS, "remove"));
+ } else if (mediator.getType() != null) {
+ variable.addAttribute(fac.createOMAttribute(
+ "type", nullNS, mediator.getType()));
+ }
+
+ serializeComments(variable, mediator.getCommentsList());
+
+ return variable;
+ }
+
+ public String getMediatorClassName() {
+
+ return VariableMediator.class.getName();
+ }
+}
diff --git a/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2MessageContext.java b/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2MessageContext.java
index 5bc21ab140..311cd72027 100644
--- a/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2MessageContext.java
+++ b/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2MessageContext.java
@@ -68,6 +68,11 @@ public class Axis2MessageContext implements MessageContext {
*/
private final Map properties = new HashMap();
+ /**
+ * Synapse Message Context variables
+ */
+ private final Map variables = new HashMap<>();
+
/**
* Local entries fetched from the configuration or from the registry for the transactional
* resource access
@@ -725,4 +730,22 @@ public HashMap getAnalyticsMetadata() {
//noinspection unchecked
return (HashMap) getProperty(SynapseConstants.ANALYTICS_METADATA);
}
+
+ @Override
+ public Object getVariable(String key) {
+ return variables.get(key);
+ }
+
+ @Override
+ public void setVariable(String key, Object value) {
+ if (value == null) {
+ return;
+ }
+ variables.put(key, value);
+ }
+
+ @Override
+ public Set getVariableKeySet() {
+ return variables.keySet();
+ }
}
diff --git a/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java b/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java
index 69fbb3d212..bb9579db7b 100644
--- a/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java
+++ b/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java
@@ -576,7 +576,12 @@ private void handleMessage(String messageID ,MessageContext response,
synapseInMessageContext.setProperty(
(String) key, synapseOutMsgCtx.getProperty((String) key));
}
-
+
+ for (Object key : synapseOutMsgCtx.getVariableKeySet()) {
+ synapseInMessageContext.setVariable(
+ (String) key, synapseOutMsgCtx.getVariable((String) key));
+ }
+
if(failOver){
//we may required to handle same message for failover cases only other than that
//should treat based on the incoming message
@@ -615,6 +620,11 @@ private void handleMessage(String messageID ,MessageContext response,
(String) key, synapseOutMsgCtx.getProperty((String) key));
}
+ for (Object key : synapseOutMsgCtx.getVariableKeySet()) {
+ synapseInMessageContext.setVariable(
+ (String) key, synapseOutMsgCtx.getVariable((String) key));
+ }
+
if (successfulEndpoint instanceof OAuthConfiguredHTTPEndpoint) {
OAuthConfiguredHTTPEndpoint httpEndpoint = (OAuthConfiguredHTTPEndpoint) successfulEndpoint;
diff --git a/modules/core/src/main/java/org/apache/synapse/deployers/LibraryArtifactDeployer.java b/modules/core/src/main/java/org/apache/synapse/deployers/LibraryArtifactDeployer.java
index f1441da6fe..cdc0208fde 100644
--- a/modules/core/src/main/java/org/apache/synapse/deployers/LibraryArtifactDeployer.java
+++ b/modules/core/src/main/java/org/apache/synapse/deployers/LibraryArtifactDeployer.java
@@ -205,7 +205,7 @@ public void undeploy(String fileName) throws DeploymentException {
} else {
String msg = "Artifact representing the filename " + fileName
+ " is not deployed on Synapse";
- log.error(msg);
+ log.warn(msg);
throw new DeploymentException(msg);
}
diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/AbstractListMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/AbstractListMediator.java
index ead1f90a90..4ed880fa64 100644
--- a/modules/core/src/main/java/org/apache/synapse/mediators/AbstractListMediator.java
+++ b/modules/core/src/main/java/org/apache/synapse/mediators/AbstractListMediator.java
@@ -32,6 +32,7 @@
import org.apache.synapse.SynapseLog;
import org.apache.synapse.aspects.flow.statistics.collectors.RuntimeStatisticCollector;
import org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder;
+import org.apache.synapse.commons.json.Constants;
import org.apache.synapse.config.SynapsePropertiesLoader;
import org.apache.synapse.core.SynapseEnvironment;
import org.apache.synapse.core.axis2.Axis2MessageContext;
@@ -54,7 +55,11 @@ public abstract class AbstractListMediator extends AbstractMediator
implements ListMediator {
private static final String MSG_BUILD_FAILURE_EXCEPTION_PATTERN = ".*(Wstx)(.*Exception)" +
- "|.*MalformedJsonException|.*(synapse\\.commons\\.staxon\\.core)|.*(com\\.fasterxml\\.jackson\\.core)";
+ "|.*MalformedJsonException|.*(synapse\\.commons\\.staxon\\.core)|.*(com\\.fasterxml\\.jackson\\.core)" +
+ "|.*JsonSyntaxException";
+
+ private static final String ORG_APACHE_SYNAPSE_COMMONS_JSON_IS_JSON_OBJECT =
+ "org.apache.synapse.commons.json.JsonInputStream.IsJsonObject";
// Create a Pattern object
protected Pattern msgBuildFailureExpattern = Pattern.compile(MSG_BUILD_FAILURE_EXCEPTION_PATTERN);
@@ -274,6 +279,13 @@ private void consumeInputOnOmException(MessageContext synCtx) {
} catch (AxisFault axisFault) {
log.error("Exception while consuming the input stream on Om Exception", axisFault);
}
+ //removing JSONstream from the message Context since it is outdated.
+ org.apache.axis2.context.MessageContext axis2MessageContext =
+ ((Axis2MessageContext) synCtx).getAxis2MessageContext();
+ axis2MessageContext.removeProperty(Constants.ORG_APACHE_SYNAPSE_COMMONS_JSON_JSON_INPUT_STREAM);
+ axis2MessageContext.removeProperty(ORG_APACHE_SYNAPSE_COMMONS_JSON_IS_JSON_OBJECT);
+ //Clearing the buffered input stream when there is an build exception occurred.
+ axis2MessageContext.setProperty(PassThroughConstants.BUFFERED_INPUT_STREAM, null);
SOAPEnvelope soapEnvelope;
if (synCtx.isSOAP11()) {
soapEnvelope = OMAbstractFactory.getSOAP11Factory().createSOAPEnvelope();
diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java
new file mode 100644
index 0000000000..03f773bd58
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java
@@ -0,0 +1,288 @@
+/*
+ * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 LLC. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.synapse.mediators.v2;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonSyntaxException;
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.util.JavaUtils;
+import org.apache.synapse.MessageContext;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.SynapseLog;
+import org.apache.synapse.aspects.ComponentType;
+import org.apache.synapse.aspects.flow.statistics.collectors.CloseEventCollector;
+import org.apache.synapse.config.SynapseConfigUtils;
+import org.apache.synapse.config.xml.SynapsePath;
+import org.apache.synapse.config.xml.XMLConfigConstants;
+import org.apache.synapse.mediators.AbstractMediator;
+
+import java.util.Set;
+
+/**
+ * The variable mediator save or remove a named variable in the Synapse Message Context.
+ */
+public class VariableMediator extends AbstractMediator {
+
+ public static final int ACTION_SET = 0;
+ public static final int ACTION_REMOVE = 1;
+ private String name = null;
+ private SynapsePath expression = null;
+ private Object value = null;
+ private String type = null;
+ private int action = ACTION_SET;
+
+ public boolean mediate(MessageContext synCtx) {
+
+ if (synCtx.getEnvironment().isDebuggerEnabled()) {
+ if (super.divertMediationRoute(synCtx)) {
+ return true;
+ }
+ }
+
+ SynapseLog synLog = getLog(synCtx);
+
+ if (synLog.isTraceOrDebugEnabled()) {
+ synLog.traceOrDebug("Start : Variable mediator");
+
+ if (synLog.isTraceTraceEnabled()) {
+ synLog.traceTrace("Message : " + synCtx.getEnvelope());
+ }
+ }
+
+ String name = this.name;
+ if (action == ACTION_SET) {
+
+ Object resultValue = getResultValue(synCtx);
+
+ if (synLog.isTraceOrDebugEnabled()) {
+ synLog.traceOrDebug("Setting variable : " + name + " to : " + resultValue);
+ }
+
+ if (resultValue instanceof OMElement) {
+ ((OMElement) resultValue).build();
+ }
+
+ synCtx.setVariable(name, resultValue);
+
+ } else {
+ if (synLog.isTraceOrDebugEnabled()) {
+ synLog.traceOrDebug("Removing variable : " + name);
+ }
+ Set variableKeySet = synCtx.getVariableKeySet();
+ if (variableKeySet != null) {
+ variableKeySet.remove(name);
+ }
+ }
+ synLog.traceOrDebug("End : Variable mediator");
+
+ return true;
+ }
+
+ public String getName() {
+
+ return name;
+ }
+
+ public void setName(String name) {
+
+ this.name = name;
+ }
+
+ public Object getValue() {
+
+ return value;
+ }
+
+ public void setValue(String value) {
+
+ setValue(value, null);
+ }
+
+ /**
+ * Set the value to be set by this variable mediator and the data type to be used when setting the value.
+ * Accepted type names are defined in XMLConfigConstants.DATA_TYPES enumeration. Passing null as the type
+ * implies that 'STRING' type should be used.
+ *
+ * @param value the value to be set as a string
+ * @param type the type name
+ */
+ public void setValue(String value, String type) {
+
+ this.type = type;
+ this.value = convertValue(value, type, false);
+ }
+
+ public String getType() {
+
+ return type;
+ }
+
+ public void reportCloseStatistics(MessageContext messageContext, Integer currentIndex) {
+
+ CloseEventCollector
+ .closeEntryEvent(messageContext, getMediatorName(), ComponentType.MEDIATOR, currentIndex,
+ isContentAltering());
+ }
+
+ public int getAction() {
+
+ return action;
+ }
+
+ public void setAction(int action) {
+
+ this.action = action;
+ }
+
+ public SynapsePath getExpression() {
+
+ return expression;
+ }
+
+ public void setExpression(SynapsePath expression, String type) {
+
+ this.expression = expression;
+ this.type = type;
+ }
+
+ private Object getResultValue(MessageContext synCtx) {
+
+ if (value != null) {
+ return value;
+ } else {
+ if (expression != null) {
+ return convertValue(expression.stringValueOf(synCtx), type, true);
+ }
+ }
+
+ return null;
+ }
+
+ private Object convertValue(String value, String type, boolean isExpression) {
+
+ if (type == null) {
+ return value;
+ }
+
+ try {
+ XMLConfigConstants.DATA_TYPES dataType = XMLConfigConstants.DATA_TYPES.valueOf(type);
+ switch (dataType) {
+ case BOOLEAN:
+ return JavaUtils.isTrueExplicitly(value);
+ case DOUBLE:
+ return Double.parseDouble(value);
+ case FLOAT:
+ return Float.parseFloat(value);
+ case INTEGER:
+ return parseInteger(value, isExpression);
+ case LONG:
+ return Long.parseLong(value);
+ case OM:
+ return buildOMElement(value);
+ case SHORT:
+ return parseShort(value, isExpression);
+ case JSON:
+ return buildJSONElement(value);
+ default:
+ return value;
+ }
+ } catch (IllegalArgumentException e) {
+ String msg = "Unknown type : " + type + " for the variable mediator or the " +
+ "variable value cannot be converted into the specified type.";
+ log.error(msg, e);
+ throw new SynapseException(msg, e);
+ }
+ }
+
+ /**
+ * This method will explicitly convert decimals to int since XPAth functions return numbers with decimal.
+ *
+ * @param value String value returned from XPAth function
+ * @param isExpression Boolean to check whether the value is from XPAth function
+ * @return parsed Short value
+ */
+ private int parseInteger(String value, boolean isExpression) {
+
+ if (isExpression && value.contains(".")) {
+ return (int) Double.parseDouble(value);
+ }
+ return Integer.parseInt(value);
+ }
+
+ /**
+ * This method will explicitly convert decimals to short since XPAth functions return numbers with decimal.
+ *
+ * @param value String value returned from XPAth function
+ * @param isExpression Boolean to check whether the value is from XPAth function
+ * @return parsed Short value
+ */
+ private short parseShort(String value, boolean isExpression) {
+
+ if (isExpression && value.contains(".")) {
+ return (short) Double.parseDouble(value);
+ }
+ return Short.parseShort(value);
+ }
+
+ @Override
+ public boolean isContentAware() {
+
+ boolean contentAware = false;
+ if (expression != null) {
+ contentAware = expression.isContentAware();
+ }
+ return contentAware;
+ }
+
+ private OMElement buildOMElement(String xml) {
+
+ if (xml == null) {
+ return null;
+ }
+ OMElement result = SynapseConfigUtils.stringToOM(xml);
+ result.buildWithAttachments();
+ return result;
+ }
+
+ private JsonElement buildJSONElement(String jsonPayload) {
+
+ JsonParser jsonParser = new JsonParser();
+ try {
+ return jsonParser.parse(jsonPayload);
+ } catch (JsonSyntaxException ex) {
+ // Enclosing using quotes due to the following issue
+ // https://github.com/google/gson/issues/1286
+ String enclosed = "\"" + jsonPayload + "\"";
+ try {
+ return jsonParser.parse(enclosed);
+ } catch (JsonSyntaxException e) {
+ // log the original exception and discard the new exception
+ log.error("Malformed JSON payload : " + jsonPayload, ex);
+ return null;
+ }
+ }
+ }
+
+ @Override
+ public String getMediatorName() {
+
+ return super.getMediatorName() + ":" + name;
+ }
+}
diff --git a/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java b/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java
index 5a64c2233f..9c7530e144 100644
--- a/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java
+++ b/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java
@@ -207,6 +207,19 @@ public static MessageContext cloneMessageContext(MessageContext synCtx, boolean
}
}
+ // copy all the variables to the newCtx
+ for (Object o : synCtx.getVariableKeySet()) {
+ String strkey = (String) o;
+ Object obj = synCtx.getVariable(strkey);
+ if (obj instanceof OMElement) {
+ if (log.isDebugEnabled()) {
+ log.debug("Deep clone for OMElement");
+ }
+ obj = ((OMElement) obj).cloneOMElement();
+ }
+ newCtx.setVariable(strkey, obj);
+ }
+
// Make deep copy of fault stack so that parent will not be lost it's fault stack
Stack faultStack = synCtx.getFaultStack();
if (!faultStack.isEmpty()) {
diff --git a/modules/core/src/test/java/org/apache/synapse/TestMessageContext.java b/modules/core/src/test/java/org/apache/synapse/TestMessageContext.java
index 727a062bf2..3f2b944d6b 100644
--- a/modules/core/src/test/java/org/apache/synapse/TestMessageContext.java
+++ b/modules/core/src/test/java/org/apache/synapse/TestMessageContext.java
@@ -43,6 +43,8 @@ public class TestMessageContext implements MessageContext {
private Map properties = new HashMap();
+ private Map variables = new HashMap();
+
private Map localEntries = new HashMap();
private Stack faultStack = new Stack();
@@ -386,4 +388,22 @@ public void setMessageFlowTracingState(int tracingState){
public int getMessageFlowTracingState(){
return SynapseConstants.TRACING_OFF;
}
+
+ @Override
+ public Object getVariable(String key) {
+
+ return variables.get(key);
+ }
+
+ @Override
+ public void setVariable(String key, Object value) {
+
+ variables.put(key, value);
+ }
+
+ @Override
+ public Set getVariableKeySet() {
+
+ return variables.keySet();
+ }
}
diff --git a/modules/coverage-report/pom.xml b/modules/coverage-report/pom.xml
index dada263699..793432ad60 100644
--- a/modules/coverage-report/pom.xml
+++ b/modules/coverage-report/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 69569ac715..011577d8fb 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -22,7 +22,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/experimental/pom.xml b/modules/experimental/pom.xml
index aed9d92b90..2557b3c0e8 100644
--- a/modules/experimental/pom.xml
+++ b/modules/experimental/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/extensions/pom.xml b/modules/extensions/pom.xml
index 6f28f24d2c..02f4ca8ef6 100644
--- a/modules/extensions/pom.xml
+++ b/modules/extensions/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/CommonScriptMessageContext.java b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/CommonScriptMessageContext.java
index 8853c27d7c..20df76bb26 100644
--- a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/CommonScriptMessageContext.java
+++ b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/CommonScriptMessageContext.java
@@ -1090,4 +1090,34 @@ public void setMessageFlowTracingState(int state) {
public int getMessageFlowTracingState() {
return SynapseConstants.TRACING_OFF;
}
+
+ @Override
+ public Object getVariable(String key) {
+
+ return mc.getVariable(key);
+ }
+
+ @Override
+ public void setVariable(String key, Object value) {
+
+ if (value instanceof XMLObject) {
+ OMElement omElement = null;
+ try {
+ omElement = xmlHelper.toOMElement(value);
+ } catch (ScriptException e) {
+ mc.setVariable(key, value);
+ }
+ if (omElement != null) {
+ mc.setVariable(key, omElement);
+ }
+ } else {
+ mc.setVariable(key, value);
+ }
+ }
+
+ @Override
+ public Set getVariableKeySet() {
+
+ return mc.getVariableKeySet();
+ }
}
diff --git a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/GraalVMJavaScriptMessageContext.java b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/GraalVMJavaScriptMessageContext.java
index 92b3e57d49..d7b6a0aa15 100644
--- a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/GraalVMJavaScriptMessageContext.java
+++ b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/GraalVMJavaScriptMessageContext.java
@@ -920,4 +920,28 @@ public void setMessageFlowTracingState(int state) {
mc.setMessageFlowTracingState(state);
}
+ @Override
+ public Object getVariable(String key) {
+
+ return mc.getVariable(key);
+ }
+
+ @Override
+ public void setVariable(String key, Object value) {
+
+ try {
+ OMElement omElement = xmlHelper.toOMElement(value);
+ mc.setVariable(key, omElement);
+ } catch (ScriptException e) {
+ // Try to convert the value into OMElement if it fails it means value is not a representation of xml so
+ // set as key value pair
+ mc.setVariable(key, value);
+ }
+ }
+
+ @Override
+ public Set getVariableKeySet() {
+
+ return mc.getVariableKeySet();
+ }
}
diff --git a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/NashornJavaScriptMessageContext.java b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/NashornJavaScriptMessageContext.java
index 7141bc3437..9f7029545f 100644
--- a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/NashornJavaScriptMessageContext.java
+++ b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/NashornJavaScriptMessageContext.java
@@ -915,5 +915,30 @@ public void setMessageFlowTracingState(int state) {
public int getMessageFlowTracingState() {
return SynapseConstants.TRACING_OFF;
}
+
+ @Override
+ public Object getVariable(String key) {
+
+ return mc.getVariable(key);
+ }
+
+ @Override
+ public void setVariable(String key, Object value) {
+
+ try {
+ OMElement omElement = xmlHelper.toOMElement(value);
+ mc.setVariable(key, omElement);
+ } catch (ScriptException e) {
+ // Try to convert the value into OMElement if it fails it means value is not a representation of xml so
+ // set as key value pair
+ mc.setVariable(key, value);
+ }
+ }
+
+ @Override
+ public Set getVariableKeySet() {
+
+ return mc.getVariableKeySet();
+ }
}
diff --git a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/OpenJDKNashornJavaScriptMessageContext.java b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/OpenJDKNashornJavaScriptMessageContext.java
index a63a36bf77..2c1392fcd6 100644
--- a/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/OpenJDKNashornJavaScriptMessageContext.java
+++ b/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/OpenJDKNashornJavaScriptMessageContext.java
@@ -902,4 +902,29 @@ public int getMessageFlowTracingState() {
public void setMessageFlowTracingState(int state) {
mc.setMessageFlowTracingState(state);
}
+
+ @Override
+ public Object getVariable(String key) {
+
+ return mc.getVariable(key);
+ }
+
+ @Override
+ public void setVariable(String key, Object value) {
+
+ try {
+ OMElement omElement = xmlHelper.toOMElement(value);
+ mc.setVariable(key, omElement);
+ } catch (ScriptException e) {
+ // Try to convert the value into OMElement if it fails it means value is not a representation of xml so
+ // set as key value pair
+ mc.setVariable(key, value);
+ }
+ }
+
+ @Override
+ public Set getVariableKeySet() {
+
+ return mc.getVariableKeySet();
+ }
}
diff --git a/modules/features/org.apache.synapse.samples.feature/pom.xml b/modules/features/org.apache.synapse.samples.feature/pom.xml
index 773b823df0..b1ea511e8e 100644
--- a/modules/features/org.apache.synapse.samples.feature/pom.xml
+++ b/modules/features/org.apache.synapse.samples.feature/pom.xml
@@ -19,7 +19,7 @@
synapse-features
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
org.apache.synapse
diff --git a/modules/features/org.apache.synapse.transport.fix.feature/pom.xml b/modules/features/org.apache.synapse.transport.fix.feature/pom.xml
index 4c2f58f63f..105c0e26f1 100644
--- a/modules/features/org.apache.synapse.transport.fix.feature/pom.xml
+++ b/modules/features/org.apache.synapse.transport.fix.feature/pom.xml
@@ -19,7 +19,7 @@
synapse-features
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
org.apache.synapse
diff --git a/modules/features/org.apache.synapse.transport.nhttp.feature/pom.xml b/modules/features/org.apache.synapse.transport.nhttp.feature/pom.xml
index 7503f5084b..385e2ca73f 100644
--- a/modules/features/org.apache.synapse.transport.nhttp.feature/pom.xml
+++ b/modules/features/org.apache.synapse.transport.nhttp.feature/pom.xml
@@ -19,7 +19,7 @@
synapse-features
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
org.apache.synapse
diff --git a/modules/features/org.apache.synapse.transport.vfs.feature/pom.xml b/modules/features/org.apache.synapse.transport.vfs.feature/pom.xml
index 79a58a1d3c..ee383d5abc 100644
--- a/modules/features/org.apache.synapse.transport.vfs.feature/pom.xml
+++ b/modules/features/org.apache.synapse.transport.vfs.feature/pom.xml
@@ -19,7 +19,7 @@
synapse-features
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
org.apache.synapse
diff --git a/modules/features/org.apache.synapse.transport.vfs.smb.feature/pom.xml b/modules/features/org.apache.synapse.transport.vfs.smb.feature/pom.xml
index 50371fb128..c18d7fbd41 100644
--- a/modules/features/org.apache.synapse.transport.vfs.smb.feature/pom.xml
+++ b/modules/features/org.apache.synapse.transport.vfs.smb.feature/pom.xml
@@ -19,7 +19,7 @@
synapse-features
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
org.apache.synapse
diff --git a/modules/features/org.apache.synapse.transport.vfs.smb2.feature/pom.xml b/modules/features/org.apache.synapse.transport.vfs.smb2.feature/pom.xml
index ca5d667aed..5b6c56f392 100644
--- a/modules/features/org.apache.synapse.transport.vfs.smb2.feature/pom.xml
+++ b/modules/features/org.apache.synapse.transport.vfs.smb2.feature/pom.xml
@@ -20,7 +20,7 @@
synapse-features
org.apache.synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
4.0.0
diff --git a/modules/features/org.apache.synapse.wso2.feature/pom.xml b/modules/features/org.apache.synapse.wso2.feature/pom.xml
index dfa7eb1911..22940be464 100644
--- a/modules/features/org.apache.synapse.wso2.feature/pom.xml
+++ b/modules/features/org.apache.synapse.wso2.feature/pom.xml
@@ -20,7 +20,7 @@
synapse-features
org.apache.synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
4.0.0
diff --git a/modules/features/pom.xml b/modules/features/pom.xml
index e2874a2064..9082cba15b 100644
--- a/modules/features/pom.xml
+++ b/modules/features/pom.xml
@@ -22,7 +22,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/handler/pom.xml b/modules/handler/pom.xml
index e9f7c20cf1..dab76e03bc 100644
--- a/modules/handler/pom.xml
+++ b/modules/handler/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml
index fc1f523e43..b7253ae750 100644
--- a/modules/integration/pom.xml
+++ b/modules/integration/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/migrator/pom.xml b/modules/migrator/pom.xml
index 3beb690d49..87c4600549 100644
--- a/modules/migrator/pom.xml
+++ b/modules/migrator/pom.xml
@@ -24,7 +24,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/packaging/package-archetype/pom.xml b/modules/packaging/package-archetype/pom.xml
index 9b64780598..0779f52645 100644
--- a/modules/packaging/package-archetype/pom.xml
+++ b/modules/packaging/package-archetype/pom.xml
@@ -22,7 +22,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../../pom.xml
synapse-package-archetype
diff --git a/modules/packaging/package-skeleton/pom.xml b/modules/packaging/package-skeleton/pom.xml
index 8aa2dd207e..3ad9a542d3 100644
--- a/modules/packaging/package-skeleton/pom.xml
+++ b/modules/packaging/package-skeleton/pom.xml
@@ -22,7 +22,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../../pom.xml
synapse-package-skeleton
diff --git a/modules/patches/pom.xml b/modules/patches/pom.xml
index 0079c88dee..6d7c82b05f 100644
--- a/modules/patches/pom.xml
+++ b/modules/patches/pom.xml
@@ -22,7 +22,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
synapse-patches
diff --git a/modules/samples/pom.xml b/modules/samples/pom.xml
index 3075edb169..8fb659a001 100644
--- a/modules/samples/pom.xml
+++ b/modules/samples/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/securevault/pom.xml b/modules/securevault/pom.xml
index b228015a3f..72ac05e7e0 100644
--- a/modules/securevault/pom.xml
+++ b/modules/securevault/pom.xml
@@ -24,7 +24,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
org.apache.synapse
diff --git a/modules/tasks/pom.xml b/modules/tasks/pom.xml
index 6c7441e509..a2893e747c 100644
--- a/modules/tasks/pom.xml
+++ b/modules/tasks/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/transports/core/nhttp/pom.xml b/modules/transports/core/nhttp/pom.xml
index 842a67c486..f7b218caa7 100644
--- a/modules/transports/core/nhttp/pom.xml
+++ b/modules/transports/core/nhttp/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
synapse-transports
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/certificatevalidation/CertificateVerificationManager.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/certificatevalidation/CertificateVerificationManager.java
index a1c9a1a831..72aa21cc14 100644
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/certificatevalidation/CertificateVerificationManager.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/certificatevalidation/CertificateVerificationManager.java
@@ -28,6 +28,7 @@
import org.apache.synapse.transport.certificatevalidation.pathvalidation.CertificatePathValidator;
import org.apache.synapse.transport.nhttp.config.TrustStoreHolder;
+import java.security.cert.Certificate;
import java.io.ByteArrayInputStream;
import java.security.InvalidKeyException;
import java.security.KeyStore;
@@ -93,10 +94,10 @@ public CertificateVerificationManager(Integer cacheAllocatedSize, Integer cacheD
* It first tries to verify using OCSP since OCSP verification is faster. If that fails it tries to do the
* verification using CRL.
*
- * @param peerCertificates javax.security.cert.X509Certificate[] array of peer certificate chain from peer/client.
+ * @param peerCertificates java.security.cert.Certificate[] array of peer certificate chain from peer/client.
* @throws CertificateVerificationException
*/
- public void verifyCertificateValidity(javax.security.cert.X509Certificate[] peerCertificates)
+ public void verifyCertificateValidity(Certificate[] peerCertificates)
throws CertificateVerificationException {
X509Certificate[] convertedCertificates = convert(peerCertificates);
@@ -154,11 +155,11 @@ public void verifyCertificateValidity(javax.security.cert.X509Certificate[] peer
}
/**
- * @param certs array of javax.security.cert.X509Certificate[] s.
+ * @param certs array of java.security.cert.Certificate[] s.
* @return the converted array of java.security.cert.X509Certificate[] s.
* @throws CertificateVerificationException
*/
- private X509Certificate[] convert(javax.security.cert.X509Certificate[] certs)
+ private X509Certificate[] convert(Certificate[] certs)
throws CertificateVerificationException {
X509Certificate[] certChain = new X509Certificate[certs.length];
Throwable exceptionThrown;
@@ -170,11 +171,7 @@ private X509Certificate[] convert(javax.security.cert.X509Certificate[] certs)
= java.security.cert.CertificateFactory.getInstance("X.509");
certChain[i]=((X509Certificate)cf.generateCertificate(bis));
continue;
- } catch (java.security.cert.CertificateEncodingException e) {
- exceptionThrown = e;
- } catch (javax.security.cert.CertificateEncodingException e) {
- exceptionThrown = e;
- } catch (java.security.cert.CertificateException e) {
+ } catch (CertificateException e) {
exceptionThrown = e;
}
throw new CertificateVerificationException("Cant Convert certificates from javax to java", exceptionThrown);
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientSSLSetupHandler.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientSSLSetupHandler.java
index caf0c87e73..9b61eea80d 100644
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientSSLSetupHandler.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientSSLSetupHandler.java
@@ -183,7 +183,7 @@ public void verify(IOSession iosession, SSLSession sslsession) throws SSLExcepti
if (verificationManager!=null) {
try {
- verificationManager.verifyCertificateValidity(sslsession.getPeerCertificateChain());
+ verificationManager.verifyCertificateValidity(sslsession.getPeerCertificates());
} catch (CertificateVerificationException e) {
throw new SSLException("Certificate Chain Validation failed for host : " + address, e);
}
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ServerSSLSetupHandler.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ServerSSLSetupHandler.java
index 9898979455..779bf38820 100644
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ServerSSLSetupHandler.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ServerSSLSetupHandler.java
@@ -77,7 +77,7 @@ public void verify(
if (verificationManager != null) {
try {
- verificationManager.verifyCertificateValidity(sslsession.getPeerCertificateChain());
+ verificationManager.verifyCertificateValidity(sslsession.getPeerCertificates());
} catch (CertificateVerificationException e) {
SocketAddress remoteAddress = iosession.getRemoteAddress();
String address;
diff --git a/modules/transports/core/pipe/pom.xml b/modules/transports/core/pipe/pom.xml
index e6e3a7f9d8..77874dead7 100644
--- a/modules/transports/core/pipe/pom.xml
+++ b/modules/transports/core/pipe/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
synapse-transports
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/transports/core/vfs/pom.xml b/modules/transports/core/vfs/pom.xml
index f43f8cef5a..b5f27af751 100644
--- a/modules/transports/core/vfs/pom.xml
+++ b/modules/transports/core/vfs/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
synapse-transports
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/transports/optional/fix/pom.xml b/modules/transports/optional/fix/pom.xml
index 1af5eaca23..58186741e2 100644
--- a/modules/transports/optional/fix/pom.xml
+++ b/modules/transports/optional/fix/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
synapse-transports
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/transports/pom.xml b/modules/transports/pom.xml
index 98f1c1e067..fce3004c52 100644
--- a/modules/transports/pom.xml
+++ b/modules/transports/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/war/pom.xml b/modules/war/pom.xml
index dbb9ec781c..6060d8c611 100644
--- a/modules/war/pom.xml
+++ b/modules/war/pom.xml
@@ -23,7 +23,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
diff --git a/modules/xar-maven-plugin/pom.xml b/modules/xar-maven-plugin/pom.xml
index 51c74efd74..1d2c443b59 100644
--- a/modules/xar-maven-plugin/pom.xml
+++ b/modules/xar-maven-plugin/pom.xml
@@ -22,7 +22,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
../../pom.xml
org.apache.synapse
diff --git a/pom.xml b/pom.xml
index 291099c15c..2da5f102b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
org.apache.synapse
Apache-Synapse
- 4.0.0-wso2v129-SNAPSHOT
+ 4.0.0-wso2v133-SNAPSHOT
Apache Synapse
Apache Synapse
pom