camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: git commit: CAMEL-7181 Propagate the attachments information when the CXF endpoint is POJO without enabling the MTOM
Date Mon, 10 Feb 2014 01:10:04 GMT
I’m sorry, I will commit a quick fix for that shortly.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On February 9, 2014 at 8:22:51 PM, Christian Müller (christian.mueller@gmail.com) wrote:
>  
> I'm afraid this commit broke the CxfMtomPOJOProducerTest:  
>  
> testInvokingServiceFromCxfProducer(org.apache.camel.component.cxf.mtom.CxfMtomPOJOProducerTest)
 
> Time elapsed: 0.164 sec <<< FAILURE!
> java.lang.AssertionError: The attachement size should be  
> 0 expected:<0>
> but was:<2>
> 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.mtom.CxfMtomPOJOProducerTest.testInvokingServiceFromCxfProducer(CxfMtomPOJOProducerTest.java:91)
 
>  
> Willem, could you please have a look?
>  
> Best,
>  
> Christian
> -----------------
>  
> Software Integration Specialist
>  
> Apache Member
> V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer  
> Apache Incubator PMC Member
>  
> https://www.linkedin.com/pub/christian-mueller/11/551/642  
>  
>  
> On Sat, Feb 8, 2014 at 3:37 AM, wrote:  
>  
> > Updated Branches:
> > refs/heads/master 20f810a8a -> 8d361e604
> >
> >
> > CAMEL-7181 Propagate the attachments information when the  
> CXF endpoint is
> > POJO without enabling the MTOM
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/camel/repo  
> > Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8d361e60  
> > Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8d361e60  
> > Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8d361e60  
> >
> > Branch: refs/heads/master
> > Commit: 8d361e604d345c183a5fe0689ac08b5177ff2124
> > Parents: 20f810a
> > Author: Willem Jiang  
> > Authored: Sat Feb 8 10:36:40 2014 +0800
> > Committer: Willem Jiang  
> > Committed: Sat Feb 8 10:36:40 2014 +0800
> >
> > ----------------------------------------------------------------------  
> > .../java/org/apache/camel/component/cxf/DefaultCxfBinding.java  
> | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> > ----------------------------------------------------------------------  
> >
> >
> >
> > http://git-wip-us.apache.org/repos/asf/camel/blob/8d361e60/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
 
> > ----------------------------------------------------------------------  
> > diff --git
> > a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
 
> > b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
 
> > index f311573..bf7d324 100644
> > ---
> > a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
 
> > +++
> > b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
 
> > @@ -169,8 +169,9 @@ public class DefaultCxfBinding implements  
> CxfBinding,
> > HeaderFilterStrategyAware
> > propagateHeadersFromCxfToCamel(cxfMessage,
> > camelExchange.getOut(), camelExchange);
> > DataFormat dataFormat =
> > camelExchange.getProperty(CxfConstants.DATA_FORMAT_PROPERTY,  
> >
> > DataFormat.class);
> > - // propagate attachments if the data format is not POJO
> > - if (cxfMessage.getAttachments() != null &&
> > !DataFormat.POJO.equals(dataFormat)) {
> > + boolean isXop =
> > Boolean.valueOf(camelExchange.getProperty(Message.MTOM_ENABLED,  
> > String.class));
> > + // propagate attachments if the data format is not POJO with  
> MTOM
> > enabled
> > + if (cxfMessage.getAttachments() != null &&
> > !(DataFormat.POJO.equals(dataFormat) && !isXop)) {
> > // propagate attachments
> > for (Attachment attachment : cxfMessage.getAttachments())  
> {
> > camelExchange.getOut().addAttachment(attachment.getId(),  
> > attachment.getDataHandler());
> >
> >
>  


Mime
View raw message