1、我的JDK版本是1.7
2、我的CXF是在官網下載的,我把全部的jar包都加進去了
3、代碼
package demo.hw.server;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public interface HelloWorld {
String sayHi(@WebParam(name="text") String text);
}
package demo.hw.server;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService(serviceName="HelloWorld")
public class HelloWorldImpl implements HelloWorld {
public String sayHi(@WebParam(name="text") String text) {
System.out.println("sayHi called");
return "Hello " + text;
}
}
package demo.hw.server;
import javax.xml.ws.Endpoint;
public class Server {
public Server() throws Exception {
System.out.println("server start");
HelloWorld helloWorld = new HelloWorldImpl();
String address = "http://localhost:9000/HelloWorld";
Endpoint.publish(address, helloWorld);
}
public static void main(String args[]) throws Exception {
new Server();
System.out.println("Server ready...");
Thread.sleep(5 * 60 * 1000);
System.out.println("Server exiting");
System.exit(0);
}
}
就這三個文件,然後報錯。。我都崩潰了,網上說的那些方法不管用啊
報錯截圖
求助
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。