這一節,通過SPRingSide來分析XFire的應用。
SpringSide開源項目是國內的開發人員所做的一個以Spring為核心的開源項目,目的是提供一個Pragmatic的企業應用開發基礎和最佳實踐展示。為使用Spring框架的開發者提供一個非Demo版的復雜、正式而體現最佳使用實踐的參照系統。為javaEEer必須面對的所有問題提供合理的、合乎Pragmatic原則的解決方案。采用Plugins形式組織,使開發者可快速定位所需的參考方案并做加法到自己的系統。
SpringSide中關于Web服務的配置是在
WEB-IBF/classes文件下的applicationContext-webservice.xml中配置的:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<import resource="classpath:org/codehaus/xfire/spring/xfire.xml"/>
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>/BookService=bookService</value>
</property>
</bean>
<bean id="baseWebService" class="org.codehaus.xfire.spring.remoting.XFireEXPorter" abstract="true">
<property name="serviceFactory" ref="xfire.serviceFactory"/>
<property name="xfire" ref="xfire"/>
</bean>
新聞熱點
疑難解答