一、导入XFire Core Libraries
在项目属性的Java Build Path->Libraries->Add Library...->MyEclipse Libraries->XFire Core Libraries
二、修改web.xml配置
增加servlet:
<!-- Web Service -->
<servlet>
<servlet-name>XFireServlet</servlet-name>
<servlet-class>org.codehaus.xfire.transport.http.XFireConfigurableServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>XFireServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
三、把Java类包装成Web服务接口
在src目录下建立 ./META-INF/xfire/services.xml文件,内容如:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>GDJTSignLogWS</name>
<namespace>http://gdjtsignlog.ps.netca.com/</namespace>
<serviceClass>netca.gdjtsignlog.webservice.GDJTSignLogWSImpl</serviceClass>
</service>
</beans>
四
然后就可以访问wsdl了
http://localhost/services/GDJTSignLogWS?wsdl