Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4E972200CA6 for ; Tue, 30 May 2017 06:49:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4D0C7160BD9; Tue, 30 May 2017 04:49:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 93866160BD6 for ; Tue, 30 May 2017 06:49:09 +0200 (CEST) Received: (qmail 83068 invoked by uid 500); 30 May 2017 04:49:08 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 83056 invoked by uid 99); 30 May 2017 04:49:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2017 04:49:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E90DAC3B61 for ; Tue, 30 May 2017 04:49:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id alApkVT83WTT for ; Tue, 30 May 2017 04:49:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 46FF960D30 for ; Tue, 30 May 2017 04:49:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3F667E0D54 for ; Tue, 30 May 2017 04:49:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2993221B5C for ; Tue, 30 May 2017 04:49:04 +0000 (UTC) Date: Tue, 30 May 2017 04:49:04 +0000 (UTC) From: "Joerg Kessler (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CXF-7388) Problem with MTOM in Camel-CXF MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 30 May 2017 04:49:10 -0000 Joerg Kessler created CXF-7388: ---------------------------------- Summary: Problem with MTOM in Camel-CXF Key: CXF-7388 URL: https://issues.apache.org/jira/browse/CXF-7388 Project: CXF Issue Type: Bug Reporter: Joerg Kessler Hi, I posted this on the CXF user list without getting a response (except from = Aki who supports this); We use CXF 3.1.9 together with Camel 2.17.4. We want to enable MTOM on the = Camel-CXF producer. To test it I created a simple route using Camel test in= frastructure where the producer uses a WSDL with base64 encoded payload par= ts. But in the log output of CXF I always get a payload like this Http-Method: POST Content-Type: multipart/related; type=3D"application/xop+xml"; boundary=3D"= uuid:2a84a041-d9ce-4caf-a8e1-b4247e1ad6d6"; start=3D""; start-info=3D"text/xml" Headers: {Accept=3D[*/*], breadcrumbId=3D[ID-WDFN32392889A-65347-1494850621= 554-0-1], Cache-Control=3D[no-cache], connection=3D[keep-alive], Content-Le= ngth=3D[487], content-type=3D[multipart/related; type=3D"application/xop+xm= l"; boundary=3D"uuid:2a84a041-d9ce-4caf-a8e1-b4247e1ad6d6"; start=3D""; start-info=3D"text/xml"], Host=3D[localhost:8770]= , Pragma=3D[no-cache], SOAPAction=3D[""], User-Agent=3D[Apache-CXF/3.1.9]} Payload: --uuid:2a84a041-d9ce-4caf-a8e1-b4247e1ad6d6 Content-Type: application/xop+xml; charset=3DUTF-8; type=3D"text/xml" Content-Transfer-Encoding: binary Content-ID: ?U1VDQ0VTUw=3D=3D --uuid:2a84a041-d9ce-4caf-a8e1-b4247e1ad6d6-- This is not MTOM. The endpoint configuration is Here I even used a WSDL that is used in the CXF MTOM tests. Then I compared= the execution of the relevant interceptors in Camel-CXF and CXF and found = one difference: In AbstractOutDatabindingInterceptor. writeToOutputStream() it is checked t= hat the data binding is implemented by the class org.apache.cxf.jaxb.JAXBDa= taBinding. That is correct for CXF but Camel-CXF sets in CxfEndpoint the b= inding to org.apache.camel.component.cxf.HybridSourceDataBinding which is d= erived from JAXBDataBinding but of course is a different class. This seems = to prevent the completion of the MTOM conversion. I changed the code locall= y so that now all subclasses are accepted and now the attachment processing= gets really called. But now the next problem apears; HybridSourceDataBindi= ng.createWriter() raises an exception: java.lang.UnsupportedOperationException: The type java.io.OutputStream is n= ot supported. =09at org.apache.camel.component.cxf.HybridSourceDataBinding.createWriter(H= ybridSourceDataBinding.java:87) I guess the method getSupportedWriterFormats of JAXBDataBinding/HybridSourc= eDataBinding should prevent something like this but in this case it does no= t work. I am also unsure whether the problem is now really in CXF or in Camel-CXF. = Therefore please forward it to Camel if the problem is locarted there.=20 Best Regards, J=C3=B6rg -- This message was sent by Atlassian JIRA (v6.3.15#6346)