0 0

WebService CXF入门问题5

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.<init>(ServerImpl.java:100)

at sun.net.httpserver.HttpServerImpl.<init>(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

 

 

SOA 
2014年11月20日 17:34
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics