Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 94030 invoked from network); 12 Oct 2010 03:09:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Oct 2010 03:09:26 -0000 Received: (qmail 1182 invoked by uid 500); 12 Oct 2010 03:09:26 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 1095 invoked by uid 500); 12 Oct 2010 03:09:24 -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 1075 invoked by uid 99); 12 Oct 2010 03:09:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 03:09:23 +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; Tue, 12 Oct 2010 03:09:15 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 7552B186EFB; Mon, 11 Oct 2010 23:08:53 -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.k7bzkorxbT 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 A812F186EF6; Mon, 11 Oct 2010 23:08:50 -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 23:07:05 -0400 User-Agent: KMail/1.13.5 (Linux/2.6.35; KDE/4.5.2; x86_64; ; ) Cc: dev@cxf.apache.org References: <201010111335.51182.dkulp@apache.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010112307.05252.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=unavailable version=3.3.1 On Monday 11 October 2010 4:57:37 pm Benson Margulies wrote: > On Mon, Oct 11, 2010 at 1:35 PM, Daniel Kulp wrote: > > > > 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. > > It is absolutely not enough for Aegis. In Aegis, the interceptor won't > find anything to do unless the DataHandlerType has set up the > attachment. The DataHandlerType won't setup any attachments unless the > mtom flag is set in the Aegis context, and that flag won't be set > unless the ServiceImpl had the MTOM_ENABLED property ... which it > lacks with JAX-WS but has with Simple. Or Aegis could call message.getContextualProperty(..) to match what the AttachmentOutInterceptor does. Or Aegis could call service.getEndpointInfo().getBinding().get(MTOM_ENABLED) so it's in one place. or. .... Bunches of options. Pick one. :-) > It should be easy enough to > make JAX-WS add that property to the ServiceImpl; is there any reason > not to? Well,it's not as easy as you think. Something like: ... should also work, but that just sets the properties on the EndpointInfo, which isn't the ServiceImpl OR the Binding. That's why the getContextualProperty call is valuable. > And also stick the threshold out there so Aegis could learn to > use it? Hold on.... are we talking READING or WRITING? Those are two very different situations. For READING, we shouldn't require a setting anywhere. If the message comes in in MIME format, it should just turn itself on automatically. The incoming side may not have any control over what the other end of the wire sends. If they send in MTOM, we should just accept it. For WRITING, the databinding really needs to use the same method that the AttachmentOutInterceptor uses. If AttachmentOut doesn't detect that it should be MTOM, then the databinding really shouldn't try as the wire won't be setup for it. (no mime wrappers) -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog