Dear All
我发布了一个WebService在服务器上,服务器上装有tomcat.
调用成功。
我在.java下写了三个接口,分别在不同的类里面。初始化接口地址请看下面代码。
public class WSServlet extends GenericServlet {
@Override
public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
Endpoint.publish("http://xx.x.x.xx:8888/jstws/RomImplan", new RomImplant());
Endpoint.publish("http://xx.x.x.xx:8888/jstws/Implant", new Implant());
Endpoint.publish("http://xx.x.x.xx:8888/jstws/SalesReturnOrExchangeGoods", new SalesReturnOrExchangeGoods());
}
}
后面需求有修改,
问题1:再发布到服务器上的时候,就不能使用一个HTTP 端口号了。否则调用失败。
问题2:我可以固定一个端口号码?不用每次发布都要改端口的吧?
问题3:我在浏览器中使用以前的URL地址访问,同样可以访问到。但是调用都是返回NULL。
问题4:以前发布成功WebService怎么停掉,使得端口号不被占用.
问题5:我在本地启动TOMCAT的时候,都会报错,错误信息
严重: StandardWrapper.Throwable
com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Cannot assign requested address: bind
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:97)
at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(HttpEndpoint.java:64)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:139)