You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2016/11/06 15:46:58 UTC

[jira] [Commented] (SYNAPSE-1060) Property mediator configuration changes with requests if the type = OM

    [ https://issues.apache.org/jira/browse/SYNAPSE-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641978#comment-15641978 ] 

Hudson commented on SYNAPSE-1060:
---------------------------------

SUCCESS: Integrated in Jenkins build Synapse - Trunk #5284 (See [https://builds.apache.org/job/Synapse%20-%20Trunk/5284/])
fix for SYNAPSE-1060 (isudana: rev 1768346)
* (edit) java/modules/core/src/main/java/org/apache/synapse/config/xml/PropertyMediatorFactory.java
* (edit) java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/PropertyMediator.java
* (edit) java/modules/core/src/test/java/org/apache/synapse/mediators/builtin/PropertyMediatorTest.java


> Property mediator configuration changes with requests if the type = OM
> ----------------------------------------------------------------------
>
>                 Key: SYNAPSE-1060
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-1060
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Isuru Udana Loku Narangoda
>            Assignee: Isuru Udana Loku Narangoda
>            Priority: Critical
>             Fix For: 3.0
>
>
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
>    <property name="AA">
>       <a xmlns=""/>
>    </property>
>    <enrich>
>       <source type="inline">
>          <b xmlns=""/>
>       </source>
>       <target xmlns:ns="http://org.apache.synapse/xsd" action="child" xpath="$ctx:AA"/>
>    </enrich>
>    <log>
>       <property name="AA" expression="$ctx:AA"/>
>    </log>
> </sequence>
> {code}
> Here initial configuration of the property mediator getting updated with each and every request.
> Log
> {code}
> 2016-10-31 07:29:51,770 [-] [PassThroughMessageProcessor-1]  INFO LogMediator To: /, MessageID: urn:uuid:349a72af-a179-4a3c-a1b1-fd0570bb1d94, Direction: request, AA = <a><b/></a>
> 2016-10-31 07:30:01,562 [-] [PassThroughMessageProcessor-2]  INFO LogMediator To: /, MessageID: urn:uuid:c40a4bbe-87b4-40c5-8d92-6589a68b5387, Direction: request, AA = <a><b/><b/></a>
> 2016-10-31 07:30:09,859 [-] [PassThroughMessageProcessor-3]  INFO LogMediator To: /, MessageID: urn:uuid:c3238c91-c139-4426-a37f-f9e4bdd4adac, Direction: request, AA = <a><b/><b/><b/></a>
> 2016-10-31 07:30:15,594 [-] [PassThroughMessageProcessor-4]  INFO LogMediator To: /, MessageID: urn:uuid:390b0637-c52b-4dac-822d-ce478a7a92a1, Direction: request, AA = <a><b/><b/><b/><b/></a>
> {code}
> Fix would be to clone the valueElement at the PropertyMediatorFactory
> Instead of 
> {code}
> if (value != null) {
>             propMediator.setValue(value.getAttributeValue(), dataType);
>         } else if (valueElement != null) {
>             propMediator.setValueElement(valueElement);
> {code}
> we need to use
> {code}
> if (value != null) {
>             propMediator.setValue(value.getAttributeValue(), dataType);
>         } else if (valueElement != null) {
>             propMediator.setValueElement(valueElement.cloneOMElement());
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org