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 02B1F200C85 for ; Tue, 30 May 2017 12:37:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 016EC160BC9; Tue, 30 May 2017 10:37:09 +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 50D7B160BC1 for ; Tue, 30 May 2017 12:37:08 +0200 (CEST) Received: (qmail 4077 invoked by uid 500); 30 May 2017 10:37:07 -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 4066 invoked by uid 99); 30 May 2017 10:37:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2017 10:37:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C15A5C02C8 for ; Tue, 30 May 2017 10:37:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 10xVR0ky0MdJ for ; Tue, 30 May 2017 10:37:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 55FEB5F36B for ; Tue, 30 May 2017 10:37:05 +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 C7880E073A for ; Tue, 30 May 2017 10:37:04 +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 5AFE421B56 for ; Tue, 30 May 2017 10:37:04 +0000 (UTC) Date: Tue, 30 May 2017 10:37:04 +0000 (UTC) From: "Joerg Kessler (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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 10:37:09 -0000 [ https://issues.apache.org/jira/browse/CXF-7388?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Joerg Kessler updated CXF-7388: ------------------------------- Attachment: cxf.client.test.sync.junit.ext.zip > Problem with MTOM in Camel-CXF > ------------------------------ > > Key: CXF-7388 > URL: https://issues.apache.org/jira/browse/CXF-7388 > Project: CXF > Issue Type: Bug > Affects Versions: 3.1.9 > Reporter: Joerg Kessler > Fix For: 3.2.0 > > Attachments: cxf.client.test.sync.junit.ext.zip > > > Hi, > I posted this on the CXF user list without getting a response (except fro= m Aki who supports this); > We use CXF 3.1.9 together with Camel 2.17.4. We want to enable MTOM on th= e Camel-CXF producer. To test it I created a simple route using Camel test = infrastructure where the producer uses a WSDL with base64 encoded payload p= arts. 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-14948506= 21554-0-1], Cache-Control=3D[no-cache], connection=3D[keep-alive], Content-= Length=3D[487], content-type=3D[multipart/related; type=3D"application/xop+= xml"; boundary=3D"uuid:2a84a041-d9ce-4caf-a8e1-b4247e1ad6d6"; start=3D""; start-info=3D"text/xml"], Host=3D[localhost:877= 0], 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: > <= soap:Body>?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 compar= ed the execution of the relevant interceptors in Camel-CXF and CXF and foun= d one difference: > In AbstractOutDatabindingInterceptor. writeToOutputStream() it is checked= that the data binding is implemented by the class org.apache.cxf.jaxb.JAXB= DataBinding. That is correct for CXF but Camel-CXF sets in CxfEndpoint the = binding to org.apache.camel.component.cxf.HybridSourceDataBinding which is= derived from JAXBDataBinding but of course is a different class. This seem= s to prevent the completion of the MTOM conversion. I changed the code loca= lly so that now all subclasses are accepted and now the attachment processi= ng gets really called. But now the next problem apears; HybridSourceDataBin= ding.createWriter() raises an exception: > java.lang.UnsupportedOperationException: The type java.io.OutputStream is= not supported. > =09at org.apache.camel.component.cxf.HybridSourceDataBinding.createWriter= (HybridSourceDataBinding.java:87) > I guess the method getSupportedWriterFormats of JAXBDataBinding/HybridSou= rceDataBinding should prevent something like this but in this case it does = not 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)