溫馨提示:您的每一次轉載,體現了我寫此文的意義!!!煩請您在轉載時注明出處http://www.aygfsteel.com/sxyx2008/謝謝合作!!!

          雪山飛鵠

          溫馨提示:您的每一次轉載,體現了我寫此文的意義!!!煩請您在轉載時注明出處http://www.aygfsteel.com/sxyx2008/謝謝合作!!!

          BlogJava 首頁 新隨筆 聯系 聚合 管理
            215 Posts :: 1 Stories :: 674 Comments :: 0 Trackbacks
          在web.xml里配置
          <servlet>
                  
          <servlet-name>xfire</servlet-name>
                  
          <servlet-class>
                      org.springframework.web.servlet.DispatcherServlet
                  
          </servlet-class>
          </servlet>
          <servlet-mapping>
                  
          <servlet-name>xfire</servlet-name>
                  
          <url-pattern>*.ws</url-pattern>
          </servlet-mapping>
          在spring配置文件中加入以下
          <bean id="xfire.annotationServiceFactory"
                  class
          ="org.codehaus.xfire.annotations.AnnotationServiceFactory">
                  
          <constructor-arg index="0">
                      
          <ref bean="xfire.commonsAnnotations"/>
                  
          </constructor-arg>
                  
          <constructor-arg index="1">
                      
          <ref bean="xfire.transportManager"/>
                  
          </constructor-arg>
                  
          <constructor-arg index="2">
                      
          <ref bean="xfire.aegisBindingProvider"/>
                  
          </constructor-arg>
              
          </bean>

              
          <bean id="xfire.commonsAnnotations"
                  class
          ="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
              
              
          <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
                  
          <property name="urlMap">
                      
          <map>
                          
          <entry key="/SynchronizService.ws">
                              
          <ref bean="synchronizservice"/>
                          
          </entry>
                      
          </map>
                  
          </property>
              
          </bean>
              
              
          <bean name="synchronizservice" class="org.codehaus.xfire.spring.remoting.XFireExporter">
                  
          <property name="serviceBean" ref="synchronizserviceBean"/>
                  
          <property name="serviceClass"><value>com.futuresoftware.webservices.SynchronizService</value></property>
                  
          <property name="serviceFactory" ref="xfire.annotationServiceFactory"/>
                
          </bean>

                
          <bean id="synchronizserviceBean" class="com.futuresoftware.webservices.SynchronizServiceImpl"/>

          以上是基于注解方式的配置具體配置可參考
          http://xfire.codehaus.org/Advanced+Configuration

          posted on 2011-06-15 10:03 雪山飛鵠 閱讀(731) 評論(0)  編輯  收藏 所屬分類: webservice
          主站蜘蛛池模板: 高阳县| 什邡市| 贡嘎县| 阿合奇县| 商河县| 织金县| 礼泉县| 喀喇沁旗| 安塞县| 大同市| 叶城县| 光泽县| 博客| 保定市| 安吉县| 会同县| 凤山县| 崇礼县| 德惠市| 凌海市| 天镇县| 锦屏县| 来凤县| 东乡县| 湛江市| 卓资县| 邮箱| 北流市| 黎平县| 潜山县| 长阳| 安徽省| 泸水县| 辽中县| 晋宁县| 新晃| 巴林右旗| 平舆县| 西昌市| 阿克陶县| 康保县|