MessageContext request = createRequest(method, args);
request.setEndpointDescription(getEndpointDescription());
request.setOperationDescription(operationDesc);
// Enable MTOM on the Message if the property was set on the SOAPBinding.
Binding bnd = getBinding();
if (bnd != null && bnd instanceof SOAPBinding) {
if (((SOAPBinding)bnd).isMTOMEnabled()) {
Message requestMsg = request.getMessage();
requestMsg.setMTOMEnabled(true);
}
}
/*
* TODO: review: make sure the handlers are set on the InvocationContext
* This implementation of the JAXWS runtime does not use Endpoint, which
* would normally be the place to initialize and store the handler list.
* In lieu of that, we will have to intialize and store them on the
* InvocationContext. also see the InvocationContextFactory. On the client
* side, the binding is not yet set when we call into that factory, so the
* handler list doesn't get set on the InvocationContext object there. Thus
* we gotta do it here.
*/
// be sure to use whatever handlerresolver is registered on the Service
requestIC.setHandlers(bnd.getHandlerChain());
requestIC.setRequestMessageContext(request);
requestIC.setServiceClient(serviceDelegate.getServiceClient(endpointDesc.getPortQName()));
// TODO: Change this to some form of factory so that we can change the IC to