We are invoking a soap service through RabbitMQ using Camel transport JaxWS client as given below (Ref: http://camel.apache.org/better-jms-transport-for-cxf-webservice-using-apache-camel.html , and used camel-cxf-transport version 2.15.2).
Service invoked successfully, but could not add interceptors to the JaxWS client proxy. Tried the following:
<client id="TestService" xmlns="http://cxf.apache.org/jaxws"
xmlns:testsvc="http://mytest.com/services/test/v2"
serviceName="testsvc:Test_v2_0_service" endpointName="testsvc:HttpTestPort"
address="camel://direct:TestService" serviceClass="test.v2.TestSVCV20" >
<outInterceptors>
<ref bean="wss4jOutInterceptor" />
</outInterceptors>
<features>
<logging xmlns="http://cxf.apache.org/core"/>
</features>
</client>
<bean id="wss4jOutInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<constructor-arg>
<map>
<entry key="action" value="testToken" />
<entry key="user" value="dummy" />
<entry key="passwordType" value="PasswordTestTxt" />
<entry key="passwordCallbackClass" value="test.PwdCallbackclass" />
</map>
</constructor-arg>
</bean>
When interceptor tag with bean ref is added it is showing the following error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [ref]
Can anyone please help with a sample on how to correctly add the interceptors in camel transport cxf client?
Thanks.