您好,登錄后才能下訂單哦!
報錯: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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。