@Override protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception { Invocation inv = super.setupInvocation(ep, epInv, invContext); // Attach the handler callback ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class); invContext.addAttachment(HandlerCallback.class, new HandlerCallbackImpl(sepMetaData)); return inv; }
protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv, InvocationContext invContext) throws Exception { CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext(); if (msgContext instanceof SOAPMessageContextJAXRPC) { invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext); } if (ServiceLifecycle.class.isAssignableFrom(ep.getTargetBeanClass()) && invContext instanceof ServletRequestContext) { ServletEndpointContext servletEndpointContext = new ServletEndpointContextImpl((ServletRequestContext)invContext); invContext.addAttachment(ServletEndpointContext.class, servletEndpointContext); } invContext.addAttachment(EndpointInvocation.class, epInv); Invocation wsInv = new DelegatingInvocation(); wsInv.setInvocationContext(invContext); wsInv.setJavaMethod(getImplMethod(endpoint, epInv)); wsInv.getInvocationContext().setTargetBean(getEndpointInstance()); return wsInv; }
private Invocation createInvocation(InvocationHandler invHandler, Object serviceObject, Endpoint ep, Method m, Object[] paramArray) { Invocation inv = invHandler.createInvocation(); InvocationContext invContext = inv.getInvocationContext(); WebServiceContext wsCtx = new WebServiceContextImpl(null); invContext.addAttachment(WebServiceContext.class, wsCtx); invContext.setTargetBean(serviceObject); inv.setJavaMethod(m); inv.setArgs(paramArray); return inv; }
wsInv.getInvocationContext().addAttachment(EndpointInvocation.class, epInv);
invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext);