PrepAway - Latest Free Exam Questions & Answers

Which of the following will enable MTOM on the client side?

A application developer has a multitude of ways to specify to use MTOM when sending a Web services
request.
Which of the following will enable MTOM on the client side?

PrepAway - Latest Free Exam Questions & Answers

A.
Service svc = Service.create(serviceName);
svc.createDispatch(portName, Source.class, PAYLOAD);
dispatch.setMTOMEnabled(true);

B.
Service svc = Service.create(serviceName);
MTOMFeature mtom = new MTOMFeature();
MtomSample proxy = svc.getPort(portName, MtomSample.class, mtom);

C.
Service svc = Service.create(serviceName);
svc.setMTOMEnabled(true);

D.
Service svc = Service.create(ServiceName);
svc.addPort(portName, SOAPBinding.SOAP11HTTP_MTOM_BINDING, endpointUrl);

E.
Service svc = Service.create(serviceName);
MtomSample proxy= svc.getPort(portName, MtomSample.class);
BindingProvider bp = (BindingProvider) proxy;
((SOAPBinding) bp.getBinding().setMTOMenabled(true);


Leave a Reply