温馨提示:您的每一次转载,体现了我写此文的意义!!!烦请您在转载时注明出处http://www.blogjava.net/sxyx2008/谢谢合作!!!

雪山飞鹄

温馨提示:您的每一次转载,体现了我写此文的意义!!!烦请您在转载时注明出处http://www.blogjava.net/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 雪山飞鹄 阅读(709) 评论(0)  编辑  收藏 所属分类: webservice

只有注册用户登录后才能发表评论。


网站导航: