Hi Anne,
The WS-Notification broker uses the standard JAX-WS APIs to create the
services (and so uses CXF under the hood). What you need to do is to
customise the JaxwsEndpointManager. For example, instead of:
Endpoint.create(bindingId, service);
you could add a CXF Feature via:
Endpoint.create(bindingId, service, new LoggingFeature());
You can add CXF interceptors via something like:
EndpointImpl ep = (EndpointImpl) Endpoint.publish("http://localhost/service",
implementor);
ep.getServer().getEndpoint().getInInterceptors().add(new
LoggingInInterceptor());
I've merged a tiny update to the JaxwsEndpointManager to make it easier to
override the creation of the Endpoint and so add CXF Feature/interceptors:
https://github.com/apache/cxf/commit/cc0f12533d407baabc29c2a1131520012db97662
Colm.
On Tue, Apr 30, 2019 at 1:56 PM Diefenbach, Anne <
[email protected]> wrote:
> Hi,
>
> does anyone have any ideas on this? Does the Notification Broker shipped
> with CXF even use the CXF bus so interceptors can hook into it? I thought
> that the interface probably is provided via CXF, but as I said, I can't
> find any point where I could add the interceptors.
>
> Thank you for any pointers
> Anne
>
> -----Ursprüngliche Nachricht-----
> Von: Diefenbach, Anne <[email protected]>
> Gesendet: Mittwoch, 17. April 2019 10:54
> An: [email protected]
> Betreff: Adding interceptors to Notification Broker
>
> Hi,
>
> we've extended the JaxwsNotificationBroker in a previous project,
> inheriting all its methods in our NotificationBroker and adding a new
> Starter class which (as far as I can tell) replaces Service.java. Now I
> want to add some interceptors to log incoming and outgoing messages. How do
> I do that? Placing a beans.xml in our resources/META-INF does nothing. I
> have no idea how to access a Server object to add the interceptors
> programmatically - the only object I have access to is the
> JaxwsNotificationBroker instance. SEI and service class are generated from
> WSDL, so I can't edit them. Does anyone have any tips how I can get my
> interceptors in there?
>
> Thank you very much for any help!
> Anne
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com