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 <[email protected]> wrote: > 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 = "com.basistech.jdd.DocumentDatabase") > @MTOM > @BindingType(SOAPBinding.SOAP11HTTP_MTOM_BINDING) > public class ... > > Service factory: > > JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean(); > svrFactory.setDataBinding(new AegisDatabinding()); > svrFactory.setServiceClass(DocumentDatabase.class); > svrFactory.setAddress("http://localhost:" + > documentServicePort + "/documentDatabase"); > svrFactory.setServiceBean(impl); > server = svrFactory.create(); > > > Client factory: > > JaxWsClientFactoryBean clientFactory = new JaxWsClientFactoryBean(); > clientFactory.setBindingId(SOAPBinding.SOAP11HTTP_MTOM_BINDING); > JaxWsProxyFactoryBean factory = new > JaxWsProxyFactoryBean(clientFactory); > factory.setDataBinding(new AegisDatabinding()); > // perhaps not needed given the endpointInterface annotation > factory.setServiceClass(DocumentDatabase.class); > factory.setAddress(serviceUrl); > return (DocumentDatabase) factory.create(); >
