[ https://issues.apache.org/jira/browse/CAMEL-3643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-3643. --------------------------------- Resolution: Fixed > camel-cxf should not copy the attachments between the CXF and Camel message > if the endpoint is working POJO DataFormat > ----------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-3643 > URL: https://issues.apache.org/jira/browse/CAMEL-3643 > Project: Camel > Issue Type: Improvement > Components: camel-cxf > Reporter: Willem Jiang > Assignee: Willem Jiang > Fix For: 2.7.0 > > > When using MTOM with CXF endpoints the MTOM-streams are propagated to > Camel-Attachments. This is very nice, but has a side effect. By default the > the attachment(s) are still there when it is time to send the output, this > means the Camel-Attachments will be added to the CXF response as > SoapAttachments. Since the response does in general not expects attachments > this gives an error (see below). > org.apache.cxf.interceptor.Fault: Could not write attachments. > at > org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(AttachmentOutInterceptor.java:98)[141:org.apache.cxf.bundle:2.2.11.fuse-00-00] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)[141:org.apache.cxf.bundle:2.2.11.fuse-00-00] > at > org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:78)[141:org.apache.cxf.bundle:2.2.11.fuse-00-00] > ... > Camel by default copies the entire input message to the output message, > including any attachments. Unless a custom processor is put in place that > removes these attachments, the CXF consumer endpoint will try to send the > attachments back to the client. Since the WSDL did not define any further > attachments it raises the error above. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira