Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 66119 invoked from network); 11 Oct 2010 17:38:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Oct 2010 17:38:09 -0000 Received: (qmail 35520 invoked by uid 500); 11 Oct 2010 17:38:09 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 35485 invoked by uid 500); 11 Oct 2010 17:38:09 -0000 Mailing-List: contact dev-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 dev@cxf.apache.org Received: (qmail 35477 invoked by uid 99); 11 Oct 2010 17:38:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Oct 2010 17:38:09 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Oct 2010 17:38:01 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id ADDBE186EF3; Mon, 11 Oct 2010 13:37:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-dev@cxf.apache.org.MHRnWa5CIK Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id CF445186EEF; Mon, 11 Oct 2010 13:37:38 -0400 (EDT) From: Daniel Kulp To: Benson Margulies Subject: Re: Dug myself into a pit switching from Simple to JAX-WS Date: Mon, 11 Oct 2010 13:35:50 -0400 User-Agent: KMail/1.13.5 (Linux/2.6.35; KDE/4.5.2; x86_64; ; ) Cc: dev@cxf.apache.org References: <201010110934.11415.dkulp@apache.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010111335.51182.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 Re-adding dev@..... On Monday 11 October 2010 9:50:01 am Benson Margulies wrote: > > Interesting. Not sure how the databinding would have any affect on > > wether MTOM is enabled or not. The JAX-WS frontend should just be > > setting the Message.MTOM_ENABLED property on the endpoint and the > > AttachmentOutInterceptor picks that up and sets up the attachments. > > It looks, superficially, as if JAX-WS is not setting that property > where Aegis looks for it. > > I crossreferenced org.apache.cxf.message.Message.MTOM_ENABLED. I can > see no connection to @MTOM. MTOM_ENABLED is turned on based on the > 'deprecated?' binding ID in > org.apache.cxf.jaxws.JaxWsClientFactoryBean.setBindingId(String). > > That function sets the boolean in the config, and > org.apache.cxf.binding.soap.SoapBindingFactory.createBindingInfo(ServiceInf > o, String, Object) then sets MTOM_ENABLED. > > Also JaxWsServiceFactoryBean maps @MTOM to the @MTOMFeature, but I > can't find a trail connecting that to MTOM_ENABLED. At some point in there (would need to debug through), I believe the JAX-WS SoapBinding thing (org/apache/cxf/jaxws/binding/soap/SOAPBindingImpl) sets the property onto the BindingInfo. From there, the AttachmentOutInterceptor queries that via a message.getContextualProperty(....). That is enough for it to setup the MIME stuff and create the AttachmentSerializer object. That SHOULD be all that is needed. The places that call the databindings/datawriter write method will first call writer.setAttachments(...) if the MIME stuff is setup. That's all the databinding should need to ENABLE MTOM. The threshold thing is completely different. I'm not even sure if that is working properly with JAXB. Need to dig more. Dan > > > Threshold would require > > > databinding support. > > Well, right. Aegis looks for MTOM_ENABLED and respects it (creating > attachments for certain data types) but does not look at > MTOM_THRESHOLD at all. > > > Strange. > > Dan > > > >> So, in trying to switch from Simple to JAX-WS, I removed the > >> setting of the 'mtom-enabled' property, and turned it off altogether. > >> That triggered the assymetry. > > > > -- > > Daniel Kulp > > dkulp@apache.org > > http://dankulp.com/blog -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog