无法实例化 SOAP 客户端 - 因 NullPointerException 而失败
Unable to instantiate SOAP Client - Failing with NullPointerException
在实例化 SOAP 客户端时,我得到 NullPointerException
@WebServiceClient(name = "QWEServiceManager", targetNamespace = "http://external.ws.services.abc.com/", wsdlLocation = "file:/C:/Users/XYZ/Desktop/77777/QWEServiceManagerService.wsdl")
public class QWEServiceManagerService extends Service
当我尝试创建一个客户端实例来调用 SOAP 服务时
QWEServiceManagerService serv = new QWEServiceManagerService()
以上抛出
Exception in thread "main" javax.xml.ws.WebServiceException: Unable to createEndpointReference Provider
at javax.xml.ws.spi.Provider.provider(Provider.java:160)
at javax.xml.ws.Service.<init>(Service.java:92)
at QWEServiceManagerService.<init>(QWEServiceManagerService .java:48)
at WsClient.main(WsClient.java:26)
Caused by: java.lang.NullPointerException
at javax.xml.ws.spi.Provider.provider(Provider.java:152)
... 3 more
在实例化 SOAP 客户端时,我得到 NullPointerException
@WebServiceClient(name = "QWEServiceManager", targetNamespace = "http://external.ws.services.abc.com/", wsdlLocation = "file:/C:/Users/XYZ/Desktop/77777/QWEServiceManagerService.wsdl")
public class QWEServiceManagerService extends Service
当我尝试创建一个客户端实例来调用 SOAP 服务时
QWEServiceManagerService serv = new QWEServiceManagerService()
以上抛出
Exception in thread "main" javax.xml.ws.WebServiceException: Unable to createEndpointReference Provider
at javax.xml.ws.spi.Provider.provider(Provider.java:160)
at javax.xml.ws.Service.<init>(Service.java:92)
at QWEServiceManagerService.<init>(QWEServiceManagerService .java:48)
at WsClient.main(WsClient.java:26)
Caused by: java.lang.NullPointerException
at javax.xml.ws.spi.Provider.provider(Provider.java:152)
... 3 more