您好,登錄后才能下訂單哦!
報(bào)錯(cuò):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/", "接口服務(wù)名");
QName PORT_NAME = new QName("http://localhost:8080/bmbank/webservice/", "接口服務(wù)名+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();
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。