// JAX-RPC message context
javax.xml.rpc.handler.MessageContext jaxrpcContext = invCtxCallback.get(javax.xml.rpc.handler.MessageContext.class);
// JAX-WS webservice context
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
WebServiceContextFactory contextFactory = spiProvider.getSPI(WebServiceContextFactory.class);
ExtensibleWebServiceContext jaxwsContext = contextFactory.newWebServiceContext(
InvocationType.JAXWS_EJB3,
invCtxCallback.get(javax.xml.ws.handler.MessageContext.class)
);
// ThreadLocal association