cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pieper, Aaron" <>
Subject Injecting a LoggingFeature with org.apache.cxf.jaxws.ServiceImpl?
Date Thu, 04 Apr 2013 14:19:02 GMT
We're using CXF 2.7.1. We have some code which contacts a web service
using a proxy. The proxy is initialized like this:


W3CEndpointReferenceBuilder w3cerBuilder = new


W3CEndpointReference w3ceReference =;

MessagingManager messagingManager =
w3ceReference.getPort(MessagingManager.class, new AddressingFeature());


We want to add a LoggingFeature to this proxy, so that we can monitor
the SOAP messages which get sent/received. Unfortunately, it looks like
this feature list is initialized, and immediately consumed, during lines
407-410 in


JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();

JaxWsClientFactoryBean clientFac = (JaxWsClientFactoryBean)

JaxWsServiceFactoryBean serviceFactory = (JaxWsServiceFactoryBean)



Our stack trace looks something like this:


WebServiceFeature...) line: 158              

ProviderImpl(ProviderImpl).getPort(EndpointReference, Class<T>,
WebServiceFeature...) line: 374        

ServiceImpl.getPort(EndpointReference, Class<T>, WebServiceFeature...)
line: 711        


So, we call W3CEndpointReference.getPort(), which delegates to these
other classes, and eventually to ServiceImpl.getPort(). Within
ServiceImpl.getPort(), the JaxWsProxyFactoryBean is initialized, then
the features are immediately initialized -- it doesn't look like we ever
get an opportunity to specify our own feature list. Is this by design?
Is there a better way for us to inject our LoggingFeature here? I think
we can enable logging by manually adding our own logging interceptors,
but it's a little clumsier that way.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message