java cxf 搭soa,WebService CXF入门问题 SOA 骑着上帝去环游 - 贪吃蛇学院-专业IT技术平台...
package deng;
import javax.xml.ws.Endpoint;
import com.founder.ws.HelloWorld;
import com.founder.ws.impl.HelloWorldImpl;
/**
*
* @author administrator
* @see 暴露 webservice 給其他應用程序調用
*
*/
public class ServiceMain {
public static void main(String []args) throws Exception{
HelloWorld hello = new HelloWorldImpl();
Endpoint.publish("http://172.18.74.47/crazyWeb", hello);
System.out.println("WebService 暴露成功!");
}
}
本人初學WebService,煩請前輩指導
本人電腦是自動獲取IP,然后報如下錯誤:
Exception in thread "main" com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Address already in use: bind
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:102)
at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(HttpEndpoint.java:63)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:171)
at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:118)
at javax.xml.ws.Endpoint.publish(Endpoint.java:240)
at deng.ServiceMain.main(ServiceMain.java:19)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.net.httpserver.ServerImpl.(ServerImpl.java:100)
at sun.net.httpserver.HttpServerImpl.(HttpServerImpl.java:50)
at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
at com.sun.net.httpserver.HttpServer.create(HttpServer.java:129)
at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:84)
... 5 more
總結
以上是生活随笔為你收集整理的java cxf 搭soa,WebService CXF入门问题 SOA 骑着上帝去环游 - 贪吃蛇学院-专业IT技术平台...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php xml expat,PHP Ex
- 下一篇: matlab ceil,matla