<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    XFire的簡(jiǎn)單配置

            有段時(shí)間業(yè)務(wù)需要webservice,所以弄了下XFire,發(fā)現(xiàn)這個(gè)工具真的很傻瓜,接下來(lái)我就把如何配置詳細(xì)的說(shuō)一下。
            首先要引入相關(guān)的jar包,jar包我就不再這里列表了,童鞋們自己去下吧,呵呵,我用的版本是1.2.6,所以我只能保證在1.2.6下運(yùn)行是正常的。
            其次,請(qǐng)打開(kāi)你的web.xml在里面添加一個(gè)servlet并將xfile的配置說(shuō)明加入進(jìn)去
        <context-param>
            
    <param-name>contextConfigLocation</param-name>
            
    <param-value>classpath*:config/spring/*.xml
                         classpath:org/codehaus/xfire/spring/xfire.xml
            
    </param-value>
        
    </context-param>

            
    1    <servlet>
    2        <servlet-name>xfire</servlet-name>
    3        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    4    </servlet>
    5
    6    <servlet-mapping>
    7        <servlet-name>xfire</servlet-name>
    8        <url-pattern>/ws/*</url-pattern>
    9    </servlet-mapping>
            請(qǐng)?jiān)赪EB-INF下添加一個(gè)xfire-servlet.xml文件,具體內(nèi)容如下
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>

        
    <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            
    <property name="urlMap">
                
    <map>
                    
    <entry key="/netsuiteservice">
                        
    <ref bean="netSuiteServiceCXF"/>
                    
    </entry>
                
    </map>
            
    </property>
        
    </bean>
        
        
    <bean id="netSuiteServiceCXF" class="org.codehaus.xfire.spring.remoting.XFireExporter">
            
    <property name="serviceFactory">
                
    <ref bean="xfire.serviceFactory"/>
            
    </property>
            
    <property name="xfire">
                
    <ref bean="xfire"/>
            
    </property>
            
    <property name="serviceBean">
                
    <ref bean="netSuiteService"/>
            
    </property>
            
    <property name="serviceClass">
                
    <value>com.akazam.ws.INetSuiteService</value>
            
    </property>
        
    </bean>

    </beans>
            大家看看就明白了,這里就是定義service的地方,你要發(fā)布的service的配置說(shuō)明
           
     1<?xml version="1.0" encoding="UTF-8"?>
     2<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     3    xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core"
     4    xsi:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"
     5    default-lazy-init="true">
     6
     7    <description>Apache CXF的Web Service配置</description>
     8    <!-- WebService的實(shí)現(xiàn)Bean定義 -->
     9     <bean id="netSuiteService" class="com.akazam.ws.impl.NetSuiteServiceImpl"/>
    10</beans>

    接下來(lái)你只需要實(shí)現(xiàn)相關(guān)的接口就可以了


    posted on 2011-04-06 11:13 Cloud kensin 閱讀(423) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): 其他

    <2011年4月>
    272829303112
    3456789
    10111213141516
    17181920212223
    24252627282930
    1234567

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(4)

    隨筆分類(lèi)

    相冊(cè)

    相冊(cè)

    搜索

    最新評(píng)論

    主站蜘蛛池模板: 国产亚洲美女精品久久久久狼| 亚洲精品在线免费看| 色吊丝性永久免费看码| 亚洲AV无码XXX麻豆艾秋| 亚洲欧美成人一区二区三区| 国产精品亚洲四区在线观看| 亚洲精品二三区伊人久久| 亚洲人成在线播放| 亚洲免费在线视频观看| 亚洲午夜国产精品| 91丁香亚洲综合社区| 亚洲欧美日韩自偷自拍| 亚洲AⅤ男人的天堂在线观看| 日韩色日韩视频亚洲网站| 国产精品亚洲精品爽爽| 无遮挡国产高潮视频免费观看| 日韩精品视频在线观看免费| jizz在线免费观看| 三年片在线观看免费西瓜视频| 全部免费毛片在线播放| 亚洲免费视频播放| 成人性生活免费视频| 国产一级高清视频免费看| 亚洲人成电影网站国产精品| 亚洲午夜福利AV一区二区无码| 亚洲一区二区在线免费观看| 亚洲一区二区三区在线| 无码色偷偷亚洲国内自拍| 一个人看的免费高清视频日本| 免费毛片在线看不用播放器| 95免费观看体验区视频| A级毛片内射免费视频| 国产做床爱无遮挡免费视频| 中文字幕第一页亚洲| 亚洲一区影音先锋色资源| 亚洲天堂2017无码中文| 麻豆一区二区三区蜜桃免费| a在线观看免费视频| 欧亚精品一区三区免费| 亚洲乱码日产精品a级毛片久久| 亚洲卡一卡2卡三卡4卡无卡三|