use of org.glassfish.webservices.monitoring.MonitorContextImpl in project Payara by payara.
the class MonitoringPipe method firePreInvocation.
private void firePreInvocation(HttpServletRequest httpRequest, Packet pipeRequest, JAXWSEndpointImpl endpointTracer, SOAPMessageContextImpl soapMessageContext, JavaCallInfo javaCallInfo) {
if (seiModel instanceof SOAPSEIModel) {
SOAPSEIModel soapSEIModel = (SOAPSEIModel) seiModel;
Globals.get(MonitorFilter.class).filterRequest(pipeRequest, new MonitorContextImpl(javaCallInfo, soapSEIModel, wsdlModel, ownerEndpoint, endpoint));
}
// Invoke preProcessRequest on global listeners. If there's a global listener we get
// a trace ID back to trace this message
String messageTraceId = wsMonitor.preProcessRequest(endpointTracer);
if (messageTraceId != null) {
soapMessageContext.put(MESSAGE_ID, messageTraceId);
wsMonitor.getThreadLocal().set(new ThreadLocalInfo(messageTraceId, httpRequest));
}
try {
// Invoke processRequest on global listeners
endpointTracer.processRequest(soapMessageContext);
} catch (Exception e) {
// temporary - need to send back SOAP fault message
}
}
use of org.glassfish.webservices.monitoring.MonitorContextImpl in project Payara by payara.
the class MonitoringPipe method firePostInvocation.
private void firePostInvocation(HttpServletResponse httpResponse, Packet pipeResponse, Packet pipeRequest, JAXWSEndpointImpl endpointTracer, SOAPMessageContextImpl soapMessageContext) {
if (seiModel instanceof SOAPSEIModel) {
SOAPSEIModel soapSEIModel = (SOAPSEIModel) seiModel;
Globals.get(MonitorFilter.class).filterResponse(pipeRequest, pipeResponse, new MonitorContextImpl(soapSEIModel.getDatabinding().deserializeRequest(pipeRequest), soapSEIModel, wsdlModel, ownerEndpoint, endpoint));
}
// Make the response packet available in the MessageContext
soapMessageContext.setPacket(pipeResponse);
try {
// Invoke processRequest on global and local listeners
endpointTracer.processResponse(soapMessageContext);
} catch (Exception e) {
// temporary - need to send back SOAP fault message
}
String messageTraceId = (String) soapMessageContext.get(MESSAGE_ID);
if (messageTraceId != null) {
wsMonitor.postProcessResponse(messageTraceId, new HttpResponseInfoImpl(httpResponse));
}
}
Aggregations