@Override public void invoke(final MessageContext msgContext) throws AxisFault { // Make sure that the method style is correctly set (This does not appear to // be handled by default) this.setOperationStyle(msgContext); // Set the msgClassLoader final String endpointName = msgContext.getService().getName(); final WebServiceClassLoader cl = ClassLoaderMap.getCL(endpointName); msgContext.setClassLoader(cl); final ClassLoader old = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(cl.getOrchestraClassLoader()); super.invoke(msgContext); } finally { Thread.currentThread().setContextClassLoader(old); } }
@Override public void initServiceDesc(final SOAPService service, final MessageContext msgContext) throws AxisFault { // Set the message classloader final String endpointName = service.getName(); final ClassLoader cl = ClassLoaderMap.getCL(endpointName); if (msgContext != null) { msgContext.setClassLoader(cl); } super.initServiceDesc(service, msgContext); } }
msgContext.setClassLoader(cl);
msgContext.setClassLoader(cl);
req.setAttribute(WsConstants.MESSAGE_CONTEXT, messageContext); messageContext.setClassLoader(classLoader);