Spring 配置bean定义的继承之XFIRE

来源:互联网 发布:数据备份技术如何分类 编辑:程序博客网 时间:2024/05/13 21:15
 

<!--引入XFire的预配置文件-->
 <import resource="classpath:org/codehaus/xfire/spring/xfire.xml" />

 <!--XFire WebService 基类-->
 <bean id="XFireExporter" class="org.codehaus.xfire.spring.remoting.XFireExporter"
  lazy-init="false" abstract="true">//注意父类在此处因为缺少<property name="serviceBean"和 <property name="serviceClass"两个属性的注入所以必需申明类为抽象的,

//两属性做为模板方法提供子类使用


  <property name="serviceFactory" ref="xfire.serviceFactory" />
  <property name="xfire" ref="xfire" />
  <!--
   <property name="outHandlers">... <property name="inHandlers">...
   因为p17为服务端的车理赔调度预约服务中,车理赔使用的客户端, 当打印报文时候报错,所以将
   “输入输出报文打印”放到具体service中详见下文
  -->
 </bean>
 <!-- 日志打印 -->
 <bean id="domOutHandler" class="org.codehaus.xfire.util.dom.DOMOutHandler" />
    <bean id="soapOutHandler" class="com.cpic.p17.ca.utils.SoapOutHandler" />
    <bean id="domInHandler" class="org.codehaus.xfire.util.dom.DOMInHandler" />
    <bean id="soapInHandler" class="com.cpic.p17.ca.utils.SoapInHandler" />

 

 

 <!-- p17为服务方 网站提交的寿险咨询 、寿险投诉  开始 -->
 <bean id="lifeSR4NetWSDL" parent="XFireExporter">
  <property name="serviceBean" ref="lifeServiceRequest4Net" />
  <!-- 接口 wsdl名称就是此接口类名 -->
  <property name="serviceClass"
   value="com.cpic.p17.ca.service.LifeServiceRequest4NetService" />
  <!-- 加入输入输出报文打印 -->
  <property name="outHandlers">
   <list>
    <ref bean="domOutHandler" />
    <ref bean="soapOutHandler" />
   </list>
  </property>
  <property name="inHandlers">
   <list>
    <ref bean="domInHandler" />
    <ref bean="soapInHandler" />
   </list>
  </property>
 </bean>

原创粉丝点击