我使用本教程http://java.dzone.com/articles/jax-ws-hello-world设置了 WS 服务器(Java 客户端当然可以正常工作)并尝试像这样在 Grails 项目中调用客户端:
客户端.java
public class Client {
public static void main(String[] args) {
GreetingImplService service = new GreetingImplService();
Greeting greeting = service.getGreetingImplPort();
System.out.println("------->> Call Started");
System.out.println(greeting.sayHello("Ali"));
System.out.println("------->> Call Ended");
}
}
测试控制器.groovy
class TestController {
def index() {
Client.main(null);
}
}
对于 Grails,此命令会引发异常:
Greeting greeting = service.getGreetingImplPort();
完整的堆栈跟踪在这里http://pastebin.ca/2316018
如何解决?