【发布时间】:2018-10-17 10:27:23
【问题描述】:
我想知道为什么我的客户端代码中有这个异常。 我只有一个 wsdl 和 Web 服务接口,并尝试调用一个方法哦这个 Web 服务。
这是我的客户端代码:
URL url = new URL("file:/C:/Projects/wsdl2.wsdl");
QName qname = new QName("http://impl.service.proxy.ma/", "SPWSImplService");
Service service = Service.create(url, qname);
SPIntWS sPIntWS = service.getPort(SPIntWS.class);
我看到了很多像我这样的情况,但在我的情况下,我无法在实现类的 @WebService 注释中给出 endpointIneterface。 这是一些日志:
Exception in thread "main" javax.xml.ws.WebServiceException: Undefined port type: {http://ws.client/}SPIntWS
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:349)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:355)
at javax.xml.ws.Service.getPort(Service.java:188)
at scci.client.application.Client.sPIntWSProcess(Client.java:74)
at scci.client.application.Client.main(Client.java:44)
感谢您的帮助。
【问题讨论】:
标签: java web-services wsdl jax-ws