最重要的就是在ApplicationContext.xml下面添加配置
<!-- service provider -->
<jaxws:endpoint
implementor="#helloWorld"
address="/HelloWorld">
<!-- in Interceptor-->
<jaxws:inInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
</jaxws:inInterceptors>
<!-- out Interceptor -->
<jaxws:outInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
</jaxws:outInterceptors>
</jaxws:endpoint>