Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 74056 invoked from network); 11 Oct 2010 12:50:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Oct 2010 12:50:50 -0000 Received: (qmail 76375 invoked by uid 500); 11 Oct 2010 12:50:50 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 76265 invoked by uid 500); 11 Oct 2010 12:50:48 -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 76257 invoked by uid 99); 11 Oct 2010 12:50:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Oct 2010 12:50:47 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bimargulies@gmail.com designates 209.85.214.41 as permitted sender) Received: from [209.85.214.41] (HELO mail-bw0-f41.google.com) (209.85.214.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Oct 2010 12:50:41 +0000 Received: by bwz19 with SMTP id 19so2237478bwz.0 for ; Mon, 11 Oct 2010 05:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=MvNwqUVM6v4t9zPWFNi34Wc4AQxmkCS5it0oPCnJjdQ=; b=Ugadqw0GFT49qW7lY/WCA1oDBNy0733W7QFa5h7wOfp7mtuWYU1Ds8O+HTN9vykwM9 g7YbW4rJw9bwLRcuhJgjm2XmUJ7nImkx5liJHC6A8hSGsd7R1nj0FA95pdNJe/qEDTG9 yFkK2NPuC7UJOjbWKnyOZshGBcswK10YFXo9Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HbtlWBjIDh4NR3ums04kZiJ7BHxqkGfkPdtGAziScfH9/yRJO7K+1/DfZa3cyWP5qz P+DgycbHrGj5IktA91EB0fwUsJXEiuR3tG967DuMg3yzy979HH+Chy49GpUohppgNj2N 6JAsz8c02V5wlCFkmYsA2pgIhtQvCFWRz1v0M= MIME-Version: 1.0 Received: by 10.204.46.226 with SMTP id k34mr1238159bkf.38.1286801416724; Mon, 11 Oct 2010 05:50:16 -0700 (PDT) Received: by 10.204.79.4 with HTTP; Mon, 11 Oct 2010 05:50:16 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Oct 2010 08:50:16 -0400 Message-ID: Subject: Re: Dug myself into a pit switching from Simple to JAX-WS From: Benson Margulies To: CXF Dev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I know a little more about this now .... When I used Simple, the effective MTOM threshold was zero. So the data was always in the InputStream of the data handler. Well, hmm, with the code below, the data is ending up inline (presumably because it isn't big enough, or because I somehow failed below to turn on MTOM for the client side), and then the DataHandler has no input stream, just an object. This strikes me, as the implementor of the Aegis databinding, as perhaps a bug in the data binding, since it's a pain to have to check both places in the data handler, and so even if the data arrives out-of-line it would, I think, be better to also set up an input stream. On Mon, Oct 11, 2010 at 8:20 AM, Benson Margulies w= rote: > This would normally belong on user but it's a sort of followup to the > Simple conversation... > > I switched my MTOM-ish service to JAX-WS, and now my MTOM items > disappear. My unit tests all fail with null pointers since the data > handlers have nothing in them. It all worked fine with Simple (and > using properties to enable MTOM).... > > So, I made the service side look like: > > SEI: > > @WebService > public interface DocumentDatabase { ... } > > Implementation class: > > @WebService(endpointInterface =3D "com.basistech.jdd.DocumentDatabase") > @MTOM > @BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) > public class ... > > Service factory: > > =C2=A0JaxWsServerFactoryBean svrFactory =3D new JaxWsServerFactoryBean(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0svrFactory.setDataBinding(new AegisDatabinding= ()); > =C2=A0 =C2=A0 =C2=A0 =C2=A0svrFactory.setServiceClass(DocumentDatabase.cl= ass); > =C2=A0 =C2=A0 =C2=A0 =C2=A0svrFactory.setAddress("http://localhost:" + > documentServicePort + "/documentDatabase"); > =C2=A0 =C2=A0 =C2=A0 =C2=A0svrFactory.setServiceBean(impl); > =C2=A0 =C2=A0 =C2=A0 =C2=A0server =3D svrFactory.create(); > > > Client factory: > > JaxWsClientFactoryBean clientFactory =3D new JaxWsClientFactoryBean(); > =C2=A0 =C2=A0 =C2=A0 =C2=A0clientFactory.setBindingId(SOAPBinding.SOAP11H= TTP_MTOM_BINDING); > =C2=A0 =C2=A0 =C2=A0 =C2=A0JaxWsProxyFactoryBean factory =3D new > JaxWsProxyFactoryBean(clientFactory); > =C2=A0 =C2=A0 =C2=A0 =C2=A0factory.setDataBinding(new AegisDatabinding())= ; > =C2=A0 =C2=A0 =C2=A0 =C2=A0// perhaps not needed given the endpointInterf= ace annotation > =C2=A0 =C2=A0 =C2=A0 =C2=A0factory.setServiceClass(DocumentDatabase.class= ); > =C2=A0 =C2=A0 =C2=A0 =C2=A0factory.setAddress(serviceUrl); > =C2=A0 =C2=A0 =C2=A0 =C2=A0return (DocumentDatabase) factory.create(); >