On 07.03.2012 19:58, Daniel Kulp wrote:
When using any of our namespace handlers, they look for a Bus object
specifically in that Spring context. If there isn't one there, they create
one for the context. In this case, not only would it not get the bus, it
wouldn't have your conduit properties picked up either.
Your best bet is to import your config below directly into your other spring
context.
I just did - no effect. I see that that the logging interceptors are
instantiated, though.
Then I moved the <jaxws:client> configuration to cxf.xml which was still
imported into the "regular" Spring XML files - no effect.
Then I dumped the cxf.xml, moved the <http:conduit> configuration to the
Spring XML file and added
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature"/>
</jaxws:features>
to all the <jaxws:client> definitions. This works.
Thanks for pointing me into the right direction. However, this feels
like a quirk. After reading
http://cxf.apache.org/docs/jax-ws-configuration.html I assumed that if I
had the <cxf:bus> configuration right there'd be a Spring bean 'cxf'
which apparently is the default bus being used for all <jaxws:client>
endpoints.
Cheers,
Marcel
On Wednesday, March 07, 2012 04:59:45 PM Marcel Stör wrote:
I have a cxf.xml that contains
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
<http:conduit name="*.http-conduit">
<http:client ProxyServer="${proxyHost}"
ProxyServerPort="${proxyPort}" ReceiveTimeout="${readTimeout}"
NonProxyHosts="${nonProxyHosts}"/>
<http:proxyAuthorization>
<sec:UserName>${proxyUser}</sec:UserName>
<sec:Password>${proxyPassword}</sec:Password>
</http:proxyAuthorization>
</http:conduit>
Then in the Spring application context XML file I have
<jaxws:client id="whatever-ID" serviceClass="whatever-class"
address="${whatever-URL}" />
for each service I have a client for.
The problem: I don't see any SOAP message being logged by the in/out
interceptors used by the bus (as configured in cxf.xml). If I use
org.apache.cxf.jaxws.JaxWsProxyFactoryBean instead in the Spring
configuration it works:
<bean id="whatever-factory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="whatever-class" />
<property name="address" value="${whatever-URL}" />
</bean>
<bean id="whatever-ID" factory-bean="whatever-factory"
factory-method="create" />
Why is that? Looking at the documentation and the source code didn't
help for me.
Cheers,
Marcel
--
Marcel Stör, http://www.frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org