如何发布一个webservice服务

2024-11-14 02:18:04
推荐回答(2个)
回答1:

(1)webservice写好后部署在tomcat或者其他服务器就等于是发布了
(2)web.xml的配置如下(不过这个文件是建Web Service Project时MyEclipse会自动配置的)




WebServices

org.apache.axis.transport.http.AxisServlet



SOAPMonitorService

org.apache.axis.monitor.SOAPMonitorService


SOAPMonitorPort
5001

100


AdminServlet

org.apache.axis.transport.http.AdminServlet

100


AxisServlet

org.apache.axis.transport.http.AxisServlet




SOAPMonitorService
/SOAPMonitor



AxisServlet
/servlet/AxisServlet


AxisServlet
*.jws


AxisServlet
/services/*



WebServices
*.jws


WebServices
/WebServices/*


index.jsp



(3)server-config.wsdd是配置服务用的,也就是配置你写的Web Service,我放个例子供你参考

xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">


value="true" />






type="java:org.apache.axis.handlers.JWSHandler">


type="java:org.apache.axis.handlers.JWSHandler">









type="java:org.apache.axis.transport.local.LocalResponder" />
type="java:org.apache.axis.handlers.http.URLMapper" />
type="java:org.apache.axis.handlers.SimpleAuthenticationHandler" />
type="java:org.apache.axis.handlers.http.HTTPAuthHandler" />


type="java:org.apache.axis.handlers.http.HTTPAuthHandler" />





http://xml.apache.org/axis/wsdd/









value="web.GsNotifyImp" />

nss





type="java:org.apache.axis.handlers.http.HTTPAuthHandler" />

value="org.apache.axis.transport.http.QSListHandler" />
value="org.apache.axis.transport.http.QSWSDLHandler" />
value="org.apache.axis.transport.http.QSMethodHandler" />






回答2:

看看这个6233335一个发布的例子