网上配置xfire的例子很多,如:http://www.javaeye.com/topic/319340
,比较详细。
但是有一点要注意,xfire不单是需要xfire-all-1.2.6.jar,xfire-distribution-1.2.6.zip里面lib下的jar都需要,不然会报如下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.typeMappingRegistry' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed;
...
因为是spring方式的create bean,提示信息无法提示具体缺少哪个包,几乎让你无法寻找到错误的根源。