use of org.glassfish.webservices.monitoring.JAXWSEndpointImpl in project Payara by payara.
the class MonitoringPipe method process.
@Override
public Packet process(Packet pipeRequest) {
// If it is a JBI request then skip the monitoring logic. This is done
// as HTTPServletRequest/Response is not available when the invocation
// is from JavaEE service engine.
String delegateClassName = pipeRequest.webServiceContextDelegate.getClass().getName();
if (delegateClassName.equals("com.sun.enterprise.jbi.serviceengine." + "bridge.transport.NMRServerConnection")) {
return next.process(pipeRequest);
}
// No monitoring available for restful services
if ("http://www.w3.org/2004/08/wsdl/http".equals(endpoint.getProtocolBinding())) {
return next.process(pipeRequest);
}
HttpServletRequest httpRequest = (HttpServletRequest) pipeRequest.get(SERVLET_REQUEST);
HttpServletResponse httpResponse = (HttpServletResponse) pipeRequest.get(SERVLET_RESPONSE);
JAXWSEndpointImpl endpointTracer = getEndpointTracer(httpRequest);
SOAPMessageContextImpl soapMessageContext = new SOAPMessageContextImpl(pipeRequest);
InvocationManager invocationManager = Globals.get(InvocationManager.class);
JavaCallInfo javaCallInfo = getJavaCallInfo(pipeRequest);
try {
pushWebServiceMethod(invocationManager, javaCallInfo);
firePreInvocation(httpRequest, pipeRequest, endpointTracer, soapMessageContext, javaCallInfo);
// Copy pipe request, since when the endpoint is NOT an EJB, it's body will be emptied after the service invocation
Packet originalPipeRequest = pipeRequest.copy(true);
Packet pipeResponse = next.process(pipeRequest);
firePostInvocation(httpResponse, pipeResponse, originalPipeRequest, endpointTracer, soapMessageContext);
return pipeResponse;
} finally {
popWebServiceMethod(invocationManager, javaCallInfo);
}
}
Aggregations