You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2013/09/18 08:28:54 UTC

[jira] [Resolved] (CAMEL-6440) loss of data on xpath after cxf (payload-mode)

     [ https://issues.apache.org/jira/browse/CAMEL-6440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-6440.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.13.0
                   2.12.1
                   2.11.2

Applied patch into master, camel-2.12.x and camel-2.11.x branches with thanks to Rene.
                
> loss of data on xpath after cxf (payload-mode) 
> -----------------------------------------------
>
>                 Key: CAMEL-6440
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6440
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.11.0, 2.12.0
>            Reporter: Rene Avontuur
>            Assignee: Willem Jiang
>             Fix For: 2.11.2, 2.12.1, 2.13.0
>
>         Attachments: CxfConsumerPayloadXPathTest.java, CxfConsumerPayloadXPathTest.java, DomConverter.patch.txt
>
>
> Applying an xpath expression to a message containing a CxfPayload may lead to loss of data. 
> A unit test to demonstrate this, has been written.
> A work around is converting the CxfPayload to a String, followed by applying xpath to the String.
> The unit test fails on current snapshot-version:
> testMessageWithIncreasingSize(org.apache.camel.component.cxf.CxfConsumerPayloadXPathTest)  Time elapsed: 1.357 sec  <<< FAILURE!
> java.lang.AssertionError: Lengths of testMessage and receiveMessage should be equal (body is CxfPayload), expected:<10000> but was:<3805>
> 	at org.junit.Assert.fail(Assert.java:88)
> 	at org.junit.Assert.failNotEquals(Assert.java:743)
> 	at org.junit.Assert.assertEquals(Assert.java:118)
> 	at org.junit.Assert.assertEquals(Assert.java:555)
> 	at org.apache.camel.component.cxf.CxfConsumerPayloadXPathTest.execTest(CxfConsumerPayloadXPathTest.java:131)
> 	at org.apache.camel.component.cxf.CxfConsumerPayloadXPathTest.testMessageWithIncreasingSize(CxfConsumerPayloadXPathTest.java:109)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira