Answer the question
In order to leave comments, you need to log in
My EndpointInterceptor implementation executes the handleRequest code twice. I can't understand why?
Good afternoon.
In a project using spring, it was necessary to implement an interceptor to log soap messages. But I can’t understand why my methods work out twice (two identical entries are poured into the log).
Example,
@Component
public class SecurityInterceptor implements EndpointInterceptor {
private Logger logger = Logger.getLogger(this.getClass());
public boolean handleRequest(MessageContext messageContext, Object endpoint) throws IOException, SOAPException {
logger.info("test message");
return true;
}
}
Answer the question
In order to leave comments, you need to log in
You need the source code of a minimal example in which this behavior is reproduced.
while you are preparing such an example, you will find the error yourself :)
it can be anything - for example, you registered an interceptor twice.
* {@link MessageDispatcher} processes an endpoint in an invocation chain, consisting of any number of interceptors,
* with the endpoint itself at the end. With this method, each interceptor can decide to abort the chain, typically
* creating a custom response.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question