Search code examples
interceptorapache-servicemix

Interceptor for all calls in servicemix


What is the best way to add an interceptor to servicemix that would log all webservice calls (or calls to osgi components would also work)?

I know of the NMR interceptors, but these apparently don't work for CXF. And I know about "jaxws:inInterceptors" but these need to be added to each endpoint manually.

I would like to intercept the calls to all endpoints (WS and RS) with a single configuration/interceptor, is this possible in servicemix?


Solution

  • you can just add CXF logging feature like this

    <!-- adding the feature to the bus-->
    <cxf:bus>
        <cxf:features>
            <cxf:logging/>
        </cxf:features>
    </cxf:bus>