I think I have found the solution--it's to use JaxWSProxyFactoryBean:
http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html#JAX-WSConfiguration-ConfiguringaClientProxy
Funny, I haven't had a need to use this class up until now.
Glen
Glen Mazza wrote:
>
> Hello, for my DoubleIt SOAP client[1] I would like to add a few
> interceptors. I know how to do that programmatically[2], but don't know
> how to do that via Spring configuration. In the cxf.xml that I place in
> the SOAP client's classpath, I would like interceptors to be declaratively
> added in this type of manner:
>
> <jaxws:client
> name="{http://www.example.org/DoubleIt}DoubleItPort.http-conduit">
> <jaxws:features>
> <bean class="org.apache.cxf.feature.LoggingFeature"/>
> </jaxws:features>
> <jaxws:outInterceptors>
> <ref bean="TimestampSignEncrypt_Request"/>
> </jaxws:outInterceptors>
> <jaxws:inInterceptors>
> <ref bean="TimestampSignEncrypt_Response"/>
> </jaxws:inInterceptors>
> </jaxws:client>
>
> But jaxws:client appears to create a new SOAP client (and NPE's because
> I'm not providing enough information)--it doesn't add these interceptors
> to my WSClient as I'd like. Is there a way to do what I'm trying to do?
> Also, what are the attributes to jaxws:client above that I need to add to
> tie these interceptors to my WSClient class?
>
> Thanks,
> Glen
>
> [1] http://www.jroller.com/gmazza/date/20080417#WFstep10
> [2] http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to (Step #2)
>
>
--
View this message in context:
http://www.nabble.com/Adding-interceptors-to-a-SOAP-client-using-Spring-tp18672098p18677180.html
Sent from the cxf-user mailing list archive at Nabble.com.