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();