applicationContext-cxf.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:tx="http://www.springframework.org/schema/tx"
  6. xmlns:aop="http://www.springframework.org/schema/aop"
  7. xmlns:jaxws="http://cxf.apache.org/jaxws"
  8. xmlns:p="http://www.springframework.org/schema/p"
  9. xmlns:cache="http://www.springframework.org/schema/cache"
  10. xsi:schemaLocation="
  11. http://www.springframework.org/schema/beans
  12. http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
  13. http://www.springframework.org/schema/context
  14. http://www.springframework.org/schema/context/spring-context-4.0.xsd
  15. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
  16. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
  17. http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
  18. http://www.springframework.org/schema/cache
  19. http://www.springframework.org/schema/cache/spring-cache-4.0.xsd">
  20. <import resource="classpath:META-INF/cxf/cxf.xml"/>
  21. <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
  22. <cache:annotation-driven cache-manager="cxfcacheManager"/>
  23. <bean id="cxfcacheManager"
  24. class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="cxfehcache"/>
  25. <!-- EhCache library setup -->
  26. <bean id="cxfehcache"
  27. class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache/ehcache-cxf.xml"/>
  28. <context:component-scan base-package="com.cxfws">
  29. <context:exclude-filter type="annotation"
  30. expression="org.springframework.stereotype.Controller" />
  31. </context:component-scan>
  32. <!-- http://192.168.30.140:8081/jygl/services/diexcWebService?wsdl -->
  33. <!--
  34. <jaxws:endpoint id="diexcWebService"
  35. implementor="com.cxfws.config.service.DiexcService" address="/diexcWebService">
  36. <jaxws:features>
  37. <bean class="org.apache.cxf.feature.LoggingFeature" />
  38. </jaxws:features>
  39. </jaxws:endpoint>
  40. -->
  41. <bean id="cxfServiceQuickReleaseFactory" class="com.cxfws.config.service.CxfServiceQuickReleaseFactory">
  42. <property name="scanPackage" value="classpath*:com/cxfws/**/service/impl/*" />
  43. <property name="quickRelease" value="true"></property>
  44. <!--
  45. <property name="jaxwsfeatures">
  46. <list>
  47. <bean class="org.apache.cxf.feature.LoggingFeature" />
  48. </list>
  49. </property>
  50. -->
  51. <property name="jaxwsinterceptors">
  52. <list>
  53. <bean class="com.cxfws.config.soapheader.AuthIntercetpr" />
  54. </list>
  55. </property>
  56. </bean>
  57. <jaxws:client id="testClient" serviceClass="com.cxfws.demo.service.impl.IDiexcService" address="http://192.168.30.140:18088/diexcWebService" >
  58. <jaxws:outInterceptors>
  59. <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"></bean>
  60. <!-- 自定义拦截器 -->
  61. <bean class="com.cxfws.config.soapheader.AddSoapHeader"/>
  62. </jaxws:outInterceptors>
  63. </jaxws:client>
  64. </beans>
  65. <!-- END SNIPPET: beans -->