web services - CXF interceptors only for client using configuration -
i have added interceptor in cxf_client.xml same interceptor invoking incoming apis well(i.e cxf_server). below changes. can 1 please tell me why interceptor invoking incoming apis? is because same bus use both server , client?
cxf_client.xml
<bean id="xcustominterceptor" class="com.test.xcustominterceptor"/> <cxf:bus> <cxf:ininterceptors> <ref bean="xcustominterceptor"/> </cxf:ininterceptors> <cxf:outinterceptors> <ref bean="xcustominterceptor"/> </cxf:outinterceptors> </cxf:bus>*
because using
<cxf:ininterceptors> <ref bean="xcustominterceptor"/> </cxf:ininterceptors>
check documentation http://cxf.apache.org/docs/bus-configuration.html
ininterceptors interceptors contributed inbound message interceptor chains. list of s or s
you can use specific interceptors inbound connection , outbound connections in server , cliente
for example, here configuration of jax-ws endpoint , client in , out interceptors
<!-- soap endpoint --> <jaxws:endpoint id="helloworld" implementor="demo.spring.helloworldimpl" address="http://localhost/helloworld"> <jaxws:ininterceptors> <ref bean="customininterceptor"/> </jaxws:ininterceptors> <jaxws:outinterceptors> <ref bean="customoutinterceptor"/> </jaxws:outinterceptors> </jaxws:endpoint> <!-- soap client bean --> <jaxws:client id="helloclient" serviceclass="demo.spring.helloworld" address="http://localhost/helloworld"> <jaxws:ininterceptors> <ref bean="customclientininterceptor"/> </jaxws:ininterceptors> <jaxws:outinterceptors> <ref bean="customclientoutinterceptor"/> </jaxws:outinterceptors> </jaxws:client>
Comments
Post a Comment