Spring Web Services Framework

org.springframework.ws.soap.server.endpoint.interceptor
Class SoapEnvelopeLoggingInterceptor

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.server.endpoint.AbstractLoggingInterceptor
          extended by org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor
All Implemented Interfaces:
EndpointInterceptor, SoapEndpointInterceptor

public class SoapEnvelopeLoggingInterceptor
extends AbstractLoggingInterceptor
implements SoapEndpointInterceptor

SOAP-specific EndpointInterceptor that logs the complete request and response envelope of SoapMessage messages. By default, request, response and fault messages are logged, but this behaviour can be changed using the logRequest, logResponse, logFault properties.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
AbstractLoggingInterceptor.setLogRequest(boolean), AbstractLoggingInterceptor.setLogResponse(boolean), setLogFault(boolean)

Field Summary
 
Fields inherited from class org.springframework.ws.server.endpoint.AbstractLoggingInterceptor
logger
 
Constructor Summary
SoapEnvelopeLoggingInterceptor()
           
 
Method Summary
protected  Source getSource(WebServiceMessage message)
          Abstract template method that returns the Source for the given WebServiceMessage.
 boolean handleFault(MessageContext messageContext, Object endpoint)
          Does nothing by default.
 void setLogFault(boolean logFault)
          Indicates whether a SOAP Fault should be logged.
 boolean understands(SoapHeaderElement header)
          Given a SoapHeaderElement, return whether or not this SoapEndpointInterceptor understands it.
 
Methods inherited from class org.springframework.ws.server.endpoint.AbstractLoggingInterceptor
afterCompletion, handleRequest, handleResponse, isLogEnabled, logMessage, logMessageSource, setLoggerName, setLogRequest, setLogResponse
 
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.ws.server.EndpointInterceptor
afterCompletion, handleRequest, handleResponse
 

Constructor Detail

SoapEnvelopeLoggingInterceptor

public SoapEnvelopeLoggingInterceptor()
Method Detail

setLogFault

public void setLogFault(boolean logFault)
Indicates whether a SOAP Fault should be logged. Default is true.


handleFault

public boolean handleFault(MessageContext messageContext,
                           Object endpoint)
                    throws Exception
Description copied from class: AbstractLoggingInterceptor
Does nothing by default. Faults are not logged.

Specified by:
handleFault in interface EndpointInterceptor
Overrides:
handleFault in class AbstractLoggingInterceptor
Parameters:
messageContext - contains both request and response messages, the response should contains a Fault
endpoint - chosen endpoint to invoke
Returns:
true to continue processing of the response interceptor chain; false to indicate blocking of the response handler chain.
Throws:
Exception

understands

public boolean understands(SoapHeaderElement header)
Description copied from interface: SoapEndpointInterceptor
Given a SoapHeaderElement, return whether or not this SoapEndpointInterceptor understands it.

Specified by:
understands in interface SoapEndpointInterceptor
Parameters:
header - the header
Returns:
true if understood, false otherwise

getSource

protected Source getSource(WebServiceMessage message)
Description copied from class: AbstractLoggingInterceptor
Abstract template method that returns the Source for the given WebServiceMessage.

Specified by:
getSource in class AbstractLoggingInterceptor
Parameters:
message - the message
Returns:
the source of the message

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.