// be sure to use whatever handlerresolver is registered on the Service
Binding binding = (Binding) getBinding();
invocationContext.setHandlers(binding.getHandlerChain());
Message requestMsg = createRequestMessage(obj);
setupMessageProperties(requestMsg);
requestMsgCtx.setMessage(requestMsg);
// Migrate the properties from the client request context bag to
// the request MessageContext.
ApplicationContextMigratorUtil.performMigrationToMessageContext(
Constants.APPLICATION_CONTEXT_MIGRATOR_LIST_ID,
getRequestContext(), requestMsgCtx);
// Perform the WebServiceFeature configuration requested by the user.
binding.configure(requestMsgCtx, this);
// Send the request using the InvocationController
ic.invoke(invocationContext);
MessageContext responseMsgCtx = invocationContext.getResponseMessageContext();
responseMsgCtx.setEndpointDescription(requestMsgCtx.getEndpointDescription());
// Migrate the properties from the response MessageContext back
// to the client response context bag.
ApplicationContextMigratorUtil.performMigrationFromMessageContext(
Constants.APPLICATION_CONTEXT_MIGRATOR_LIST_ID,
getResponseContext(), responseMsgCtx);
if (hasFaultResponse(responseMsgCtx)) {
WebServiceException wse = BaseDispatch.getFaultResponse(responseMsgCtx);
throw wse;
}
Message responseMsg = responseMsgCtx.getMessage();
Object returnObj = getValueFromMessage(responseMsg);
//Check to see if we need to maintain session state
checkMaintainSessionState(requestMsgCtx, invocationContext);