Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:cxf="http://cxf.apache.org/core"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">

    <bean id="MyInterceptor" class="demo.interceptor.MyInterceptor"/>

    <!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. -->

    <cxf:bus>
        <cxf:inInterceptors>
            <list>
                <ref bean="MyInterceptor"/>
            </list>
        </cxf:inInterceptors>
        <cxf:outInterceptors>
            <list>
                <ref bean="MyInterceptor"/>
            </list>
        </cxf:outInterceptors>
    </cxf:bus>
</beans>

You

...

start

...

your

...

server

...

using

...

-Dcxf.config.file=server.xml

...

to

...

specify

...

the

...

configuration

...

file.

...

Adding MyInterceptor to your client:

...