문제

I have a CXF Rest Service and I am trying to create a logging mechanism that will log specific request and response details.

All the details I want to be written into a file in one write. As a result I am looking forward to create an Interceptor that will be invoked in the RECEIVE and in the SEND phase. Until now I haven't find any way to do it.

Is it possible to create an Interceptor registered in two phases of two different chains?

Thanks

도움이 되었습니까?

해결책

Just got an answer from the cxf-user mailing lists which is

It’s not possible to register the exact same interceptor object in two phases. You can register two separate interceptors of the same class on different phases, but not the same exact object. The phase needs to be set at construction time.

Daniel Kulp

So the answer is No.

link to post

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top