报错:Caused by: java.io.IOException: java.net.URISyntaxException:
Invalid address. Endpoint address cannot be null. at index 0: <null>
解决方法:
将原来代码换成:
QName SERVICE_NAME = new QName("http://service.request.operation.draft.pcitc.com/", "接口服务名");
QName PORT_NAME = new QName("http://localhost:8080/bmbank/webservice/", "接口服务名+Port");
Service service = Service.create(SERVICE_NAME);
String endpointAddress = "http://localhost:8080/bmbank/webservice/ReqRegisterService";
service.addPort(PORT_NAME, SOAPBinding.SOAP12HTTP_BINDING, endpointAddress);
ReqRegisterService req=service.getPort(ReqRegisterService.class);
换成如下代码:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(ReqRegisterService.class);
factory.setAddress("http://localhost:8080/bmbank/webservice/ReqRegisterService");
ReqRegisterService req = (ReqRegisterService) factory.create();
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。