No operation was found with the name {http://impl.service.xq.com/}sayHi

来源:互联网 发布:初学java什么书比较好 编辑:程序博客网 时间:2024/05/20 23:58

org.apache.cxf.common.i18n.UncheckedException: No operation was found with the name {http://impl.service.xq.com/}sayHi.
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:347)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341)
at com.xq.test.Test.main(Test.java:12)
Exception in thread "main" java.lang.NullPointerException
at com.xq.test.Test.main(Test.java:17)

将@webservice的targetNamespace改成"http://service.xq.com/",也就是发布的接口的包名,实在不知道就直接进入http://localhost:8080/cxftest/ws/helloService?wsdl,查看wsdl:definitions标签的xmlns:ns1="http://service.xq.com/",这也就是targetNamespace的值。

0 0
原创粉丝点击