javax.xml.ws.WebServiceException: Undefined port type Java Struts SOAP WSDL

假如想象 提交于 2019-12-04 07:22:42

give endpointIneterface in @WebService annotation in the implementation class, if you dont give endpoint interface, you have to mention fully qualified port name while using getPort method.

service.getPort("PortQName",BankCard.class);

You need to annotate the BankCardImpl class with @WebService(name="BankCard")
You can then use service.getPort(BankCard.class);

OR

If you just annotate it with @WebService or have given it another name, then you will need to provide more information to the getPort() method:

replace

BankCard bankcard = service.getPort(BankCard.class);

with

QName port_name = new QName("http://server.bcard.soap.com/","BankCardImplPort");
BankCard bankcard = service.getPort(port_name, BankCard.class);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!