這一節(jié),通過SPRingSide來分析XFire的應用。
SpringSide開源項目是國內(nèi)的開發(fā)人員所做的一個以Spring為核心的開源項目,目的是提供一個Pragmatic的企業(yè)應用開發(fā)基礎(chǔ)和最佳實踐展示。為使用Spring框架的開發(fā)者提供一個非Demo版的復雜、正式而體現(xiàn)最佳使用實踐的參照系統(tǒng)。為javaEEer必須面對的所有問題提供合理的、合乎Pragmatic原則的解決方案。采用Plugins形式組織,使開發(fā)者可快速定位所需的參考方案并做加法到自己的系統(tǒng)。
SpringSide中關(guān)于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>
新聞熱點
疑難解答