It looks like the Server.getEndpoint().getBinding() returns a cxf 
SoapBinding instead of a JaxWS SOAPBinding so the documented method for
enabling MTOM doesn't work. 

Is the following an acceptable workaround or is this a bug?

       JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setBus(BusFactory.getDefaultBus());
        factory.setServiceName(new QName("http://mediStor.org/x-rays";,
                "xRayStorage"));
        factory.setEndpointName(new QName("http://mediStor.org/x-rays";,
                "XRaySOAPPort"));
        factory.setServiceClass(FirstService.class);
        factory.setAddress("http://localhost:8080/xray";);
        factory.setWsdlLocation("test.wsdl");
        factory.setInvoker(new JAXWSMethodInvoker(new
PerRequestFactory(factory
                .getServiceClass())));
        Server srv = factory.create();
        ((SoapBinding) srv.getEndpoint().getBinding()).getBindingInfo()
               .setProperty(Message.MTOM_ENABLED, true);


--
View this message in context: 
http://cxf.547215.n5.nabble.com/JaxWsServerFactoryBean-enabling-MTOM-tp5135629p5135629.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to