New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoggingClientInterceptor gets disabled when some interceptor is set #180

Closed
ahoeing opened this Issue Dec 19, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@ahoeing

ahoeing commented Dec 19, 2016

When adding some interceptor to the interceptor chain, the logging client interceptor gets removed. This seems to be some arbritary behavior that confused me.

See class: com.consol.citrus.ws.client.WebServiceClient line 83 ff

        if (CollectionUtils.isEmpty(getEndpointConfiguration().getInterceptors()) && getEndpointConfiguration().getInterceptor() == null) {
            LoggingClientInterceptor loggingClientInterceptor = new LoggingClientInterceptor();
            loggingClientInterceptor.setMessageListener(context.getMessageListeners());

            getEndpointConfiguration().setInterceptor(loggingClientInterceptor);
        }
@christophd

This comment has been minimized.

Member

christophd commented Dec 20, 2016

That is how it is supposed to work, when adding custom interceptors you may also decide where in the interceptor chain the logging should take place. This is why the default interceptor is not added automatically.

Maybe I should explain that thought in reference guide.

@christophd christophd added this to the v2.7 milestone Dec 20, 2016

@christophd christophd added IN PROGRESS and removed READY labels Jan 23, 2017

@christophd christophd self-assigned this Jan 23, 2017

@christophd christophd removed their assignment Jan 24, 2017

@karnis

This comment has been minimized.

Contributor

karnis commented Feb 9, 2017

@christophd This behavior does not seem to be consistent to me when compared to the other Producers which never seem to lose the MessageListener notification.

An option would be

  • to append the interceptor to the end/beginning of the chain if its not present
  • to optionally control the messageListener notification (on/off) in the endpoint configuration

Makes sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment