最近公司做个小项目,用C#调用java做成的webservice,调查了一下,整理备用。
一、webservice做成
1,选用xfire作为web服务引擎。先把需要的jar下载(xFire_lib.rar)
2,eclipse中创建Dynamic Web Project,并导入第一步的jar包。
3,在WebContent\WEB-INF\web.xml中配置XFireServlet,如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>xfireTest</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<wel