在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