Given that StockQuoteService is a Service class and StockQuoteProvider is a corresponding SEI for a web service. Which of the following options enable MTOM feature for proxy for the StockQuoteProvider SEI ? (Choose one)
A.
proxy = new StockQuoteService().getStockQuoteProvider()
B.
proxy = new StockQuoteService().getStockQuoteProvider(new MTOMFeature())
C.
proxy = new StockQuoteService(new MTOMFeature()).getStockQuoteProvider()
D.
proxy = new StockQuoteService().getStockQuoteProvider(new RespectBindingFeature())
To enable MTOM on the client of the Web Service, pass the javax.xml.ws.soap.MTOMFeature as a parameter when creating the Web Service proxy or dispatch, as illustrated in the following example.
package examples.webservices.mtom.client;
import javax.xml.ws.soap.MTOMFeature;
public class Main {
public static void main(String[] args) {
String FOO = “FOO”;
MtomService service = new MtomService()
MtomPortType port = service.getMtomPortTypePort(new MTOMFeature());
String result = null;
result = port.echoBinaryAsString(FOO.getBytes());
System.out.println( “Got result: ” + result );
}
}
B is correct