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

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

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

    XFire的簡單配置

            有段時(shí)間業(yè)務(wù)需要webservice,所以弄了下XFire,發(fā)現(xiàn)這個(gè)工具真的很傻瓜,接下來我就把如何配置詳細(xì)的說一下。
            首先要引入相關(guān)的jar包,jar包我就不再這里列表了,童鞋們自己去下吧,呵呵,我用的版本是1.2.6,所以我只能保證在1.2.6下運(yùn)行是正常的。
            其次,請打開你的web.xml在里面添加一個(gè)servlet并將xfile的配置說明加入進(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>
            請?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的配置說明
           
     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>

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


    posted on 2011-04-06 11:13 Cloud kensin 閱讀(421) 評論(0)  編輯  收藏 所屬分類: 其他

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

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(4)

    隨筆分類

    相冊

    相冊

    搜索

    最新評論

    主站蜘蛛池模板: 亚洲AV无码男人的天堂| 亚洲国产成人综合精品| 99麻豆久久久国产精品免费| 国产一区二区三区免费视频| 久久久久亚洲AV无码去区首| 国产禁女女网站免费看| 国产精品亚洲精品日韩动图 | 久久久国产精品福利免费| 亚洲男人的天堂www| 18禁在线无遮挡免费观看网站| 亚洲欧洲自拍拍偷午夜色无码| a级毛片毛片免费观看永久| 国产AV无码专区亚洲AV男同| 久久午夜夜伦鲁鲁片免费无码 | 亚洲一区二区高清| 三级毛片在线免费观看| 亚洲综合婷婷久久| 最近最新中文字幕完整版免费高清| 亚洲综合色婷婷在线观看| 免费人成年轻人电影| 成人性生交大片免费看好| 久久狠狠高潮亚洲精品| 在线视频观看免费视频18| 国产成人亚洲精品蜜芽影院| 国产成人精品曰本亚洲79ren| 久久成人a毛片免费观看网站| 亚洲专区一路线二| heyzo亚洲精品日韩| 无码国产精品一区二区免费16| 亚洲人xxx日本人18| 亚洲国产精品无码久久久久久曰 | 国产在线观看免费不卡| 一级全免费视频播放| 蜜芽亚洲av无码精品色午夜| 免费高清资源黄网站在线观看| 国产91成人精品亚洲精品| 亚洲av日韩av无码黑人| 免费看大美女大黄大色| 巨胸狂喷奶水视频www网站免费| 久久亚洲精品国产精品| 四虎国产精品免费视|