tomcat5.0下使用webService的部署步骤
1、下载Axis的包:http://apache.etoak.com/ws/axis/1_4/axis-bin-1_4.zip
2、将解压的共9个包copy到web工程的/WEB-INF/lib目录
3、将解压的共9个包copy到tomcat5.0/common/lib目录
4、部署你的web工程的web.xml
<!--axis AxisServlet mapping -->
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>
org.apache.axis.transport.http.AxisServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>wsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<!--axis AxisServlet mapping over -->
5、配置部署文档web工程的/WEB-INF/server-config.wsdd(名字随意)
<?xml version="1.0" encoding="UTF-8"?>
<deployment name="defaultClientConfig" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:handler="http://xml.apache.org/axis/wsdd/providers/handler" xmlns="http://xml.apache.org/axis/wsdd/">
<globalConfiguration name="defaultClientConfig">
<requestFlow name="RequestFlow1" type="">
<handler name="Handler1" type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler name="Handler2" type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
<handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
<transport name="http" type="">
<requestFlow name="RequestFlow1" type="">
<handler name="Handler1" type="URLMapper"/>
<handler name="Handler2" type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
</transport>
<transport name="local" type="">
<responseFlow name="ResponseFlow1" type="">
<handler name="Handler1" type="LocalResponder"/>
</responseFlow>
</transport>
<service name="TestHello" type="" provider="java:RPC" >
<parameter name="scope" value="Request"/>
<parameter name="className" value="com.bonc.scdx.agent.model.singleLoginCRM.ValidateTokenWebServices"/>
<parameter name="allowedMethods" value="*"/>
<namespace>http://com.bonc.scdx.agent.model.singleLoginCRM</namespace>
</service>
</deployment>
6、TestHello.java(提供服务类):
7、jsp或application(main函数)调用代码