HashMap<String, Object> in = new HashMap<String, Object>();
HashMap<String, Object> out = new HashMap<String, Object>();
ConsultaCdlBh cdl = new ConsultaCdlBh();
in.put("TPDOCUMENTO","1");
in.put("CPFCNPJ","07607413790");
in.put("RG"," ");
in.put("ORIGEMCHEQUE"," ");
in.put("CODBANCO","000");
in.put("CODAGENCIA","0000");
in.put("NUMCC"," ");
in.put("DIGITOCC"," ");
in.put("NUMCHEQUEINICIAL" , "000000");
in.put("DIGITOCHEQUEINICIAL","0");
in.put("CMC7","000000000000000000000000000000");
in.put("QUANTCHEQUES",00);
in.put("VALORGARANTIA" ,Double.parseDouble("000000000000")) ;
in.put("TPCREDITO"," ");
in.put("INTERVALOPARCELAS" ,Integer.parseInt("000"));
Date data= UtilData.getDate("01/01/1900", UtilData.SHORTDATE);
in.put("DTVENCIMENTOPRIMEIRAPARCELA", data);
in.put("QTPARCELAS",0);
in.put("VALORTOTALOPERACAO", Double.valueOf("000000000000"));
in.put("CEPORIGEM","00000000");
in.put("DDD" , "000");
in.put("TELEFONE","0000000000");
in.put("DTABERTURACC",data);
in.put("PRACACOMPENSACAOCHEQUE","000");
in.put("NUMAUTORIZACAOCHEQUE","00000000");
in.put("CODCANCELAMENTOCHEQUE","00");
try {
out = ConsultaCdlBh.execute(in);
Iterator<String> ele = out.keySet().iterator();
while (ele.hasNext()) {
String valueHash = (String) ele.next();
String msg = "[" + valueHash + "] >> [" + out.get(valueHash) + "]";
log.info(msg);
}
}catch (InfraException e) {
log.error("O serviço da CDL-BH encontra-se indisponível");
log.debug(e.getMessage());
} catch (LayoutException e) {
log.error("Existe diferença entre o layout enviado a CDL-BH e o esperado pelo órgão");
log.debug(e.getMessage());
} catch (ConfigException e) {
log.error("Existe um erro na configuração do serviço: " + e.getMessage());
log.debug(e.getMessage());
}catch(Exception e){
log.error("Existe um erro na configuração do serviço: " + e.getMessage());
log.debug(e.getMessage());
} finally {
log.debug("<<TesteCDL-BH.process()");
log.info("Finalizou a execução do acesso a CDL-BH");
}