Hi,
I have written a client code to consume a service. The wsdl contains a
schema element of type base64encoder. CXF is sending the content of that
element using MTOM attachment since it is binary data but the service
provider is unable to retrieve the content through attachment due to
framework limitations. I have tried to turn off the MTOM feature by adding
MTOMFeature class instance to the JaxWSProxyFactoryBean but not able to
because MTOMFeature class is not a subclass of AbstractFeature class.

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
javax.xml.ws.soap.MTOMFeature mtom = new MTOMFeature(false);
factory.getFeatures().add(mtom); // Compilation Error....
factory.setServiceClass(ESignExternalListDocumentForSigner.class);
factory.setAddress("https://127.0.0.1:29528/e-Sign/ListDocumentForSigner";);
factory.create();

I cannot go for a change in the schema because the service provider also has
to accept the change. I have also tried the below option which does not seem
to be working.

SOAPBinding sbinding = (SOAPBinding)bp.getBinding();
sbinding.setMTOMEnabled(false);

Please suggest how to resolve the compilation error.

Thanks in Advance,
Asif Ali Mohammed.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Turn-off-MTOM-feature-in-the-client-code-to-avoid-xop-generation-tp5711807.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Reply via email to