标签:技术 web.xml let system 依赖 startup log 代理类 ack
package service; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; @WebService(targetNamespace="http://www/shyroke.com/") public interface IFirst { @WebResult(name = "addResult") public int add(@WebParam(name = "x") int x, @WebParam(name = "y") int y); }
package service; import javax.jws.WebService; @WebService(endpointInterface="service.IFirst") public class FirstDelegate implements IFirst{ public int add(int x, int y) { return x+y; } }
<?xml version = "1.0"?> <endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"> <endpoint name="first" implementation="service.FirstDelegate" url-pattern="/firstPort"> </endpoint> </endpoints>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <listener> <listener-class> com.sun.xml.ws.transport.http.servlet.WSServletContextListener </listener-class> </listener> <servlet> <servlet-name>public</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>public</servlet-name> <url-pattern>/firstPort</url-pattern> </servlet-mapping> </web-app>
标签:技术 web.xml let system 依赖 startup log 代理类 ack
原文地址:http://www.cnblogs.com/shyroke/p/7673916.html