public void excute() { URL wsdlURL = SBFIFATDImportAssetRetirmentSrv.WSDL_LOCATION; SBFIFATDImportAssetRetirmentSrv ss = new SBFIFATDImportAssetRetirmentSrv(wsdlURL, SERVICE_NAME); SBFIFAImportAssetRetirmentSrv port = ss.getSBFIFAImportAssetRetirmentSrvPort(); Client client = ClientProxy.getClient(port); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(1000000000); // 连接时间 httpClientPolicy.setReceiveTimeout(1000000000); // 接收时间 httpClientPolicy.setAllowChunking(false); http.setClient(httpClientPolicy); { System.out.println("Invoking process..."); ImportAssetRetirmentSrvRequest _process_payload = null; _process_payload = new ImportAssetRetirmentSrvRequest(); MsgHeader msgHeader = new MsgHeader(); _process_payload.setMsgHeader(msgHeader); ImportAssetRetirmentSrvInputCollection collection = new ImportAssetRetirmentSrvInputCollection(); if (srvInputItems != null) { for (int i = 0; i < srvInputItems.size(); i++) { ImportAssetRetirmentSrvInputItem inputItem = srvInputItems.get(i); collection.getImportAssetRetirmentSrvInputItem().add(inputItem); } } // 传递数据集到request中 _process_payload.setImportAssetRetirmentSrvInputCollection(collection); ImportAssetRetirmentSrvResponse _process__return = port.process(_process_payload); System.out.println( "process.result=" + _process__return.getErrorFlag() + "||" + _process__return.getErrorMessage()); returnMessage.setErrorFlag(StrUtil.nullToString(_process__return.getErrorFlag())); returnMessage.setErrorMessage(_process__return.getErrorMessage()); if (_process__return.getErrorFlag().equals("Y")) { responseItemList = _process__return.getResponseCollecion().getResponseItem(); System.out.println("结果Y: " + responseItemList); } else { errorItemList = _process__return.getErrorCollection().getErrorItem(); int s1 = errorItemList.size(); for (int i = 0; i < s1; i++) { System.out.println("结果N: " + errorItemList.get(0).getERRORMESSAGE()); } } } }
public void excute() { URL wsdlURL = SBFIFATransAssetDeprecationSrv_Service.WSDL_LOCATION; SBFIFATransAssetDeprecationSrv_Service ss = new SBFIFATransAssetDeprecationSrv_Service(wsdlURL, SERVICE_NAME); com.sino.soa.mis.eip.fi.fa.sb_fi_fa_transassetdeprecationsrv.SBFIFATransAssetDeprecationSrv port = ss.getSBFIFATransAssetDeprecationSrvPort(); Client client = ClientProxy.getClient(port); HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(5400000); // 连接时间 httpClientPolicy.setReceiveTimeout(5400000); // 接收时间 httpClientPolicy.setAllowChunking(false); http.setClient(httpClientPolicy); { System.out.println("SB_FI_FA_TransAssetDeprecationSrv Invoking process..."); SBFIFATransAssetDeprecationSrvProcessRequest _process_payload = null; _process_payload = new SBFIFATransAssetDeprecationSrvProcessRequest(); _process_payload.setENVCODE(envCode); _process_payload.setPERIODNAME(periodName); long s = System.currentTimeMillis(); com.sino.soa.mis.eip.fi.fa.sb_fi_fa_transassetdeprecationsrv .SBFIFATransAssetDeprecationSrvProcessResponse _process__return = port.process(_process_payload); srvMessage.setErrorFlag(StrUtil.nullToString(_process__return.getERRORFLAG())); srvMessage.setErrorMessage(_process__return.getERRORMESSAGE()); System.out.println( "process.result=" + _process__return.getINSTANCEID() + "||" + _process__return.getERRORFLAG() + "||" + _process__return.getERRORMESSAGE()); System.out.println("耗时" + (System.currentTimeMillis() - s) + "毫秒"); } }