?
?
?
dom4j是xml解析工具包,其他為axis搭建webservice必須包 jdk可能需要1.8及以上
?
server-config.wsdd中具體配置發(fā)布名稱
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<service name="firstWs" provider="java:RPC">
<parameter name="className" value="com.ws.demo.FirstWsImpl"/>
<parameter name="allowedMethods" value="*"/>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
</requestFlow>
</transport>
</deployment>
?
其中firstWs為發(fā)布名稱
web.xml中配置過濾器
<display-name>Archetype Created Web Application</display-name>
<!-- axis 配置 -->
<servlet>
<servlet-name>axis</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>axis</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
?
//wsdl發(fā)布地址
?
axis的客戶端訪問見項目中testWsdl.java
?
?
?
本文摘自 :https://www.cnblogs.com/