public class BanrisulUtil extends Object
| Constructor and Description |
|---|
BanrisulUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
comunicacaoHttpsURLConnection(String envelopeSoap,
ConfiguracaoBanrisulAPI configuracao)
Comunicação com o WebService.
|
static String |
extrairNoXmlRetorno(String xml)
Extrai nó dados do xml de retorno.
|
static String |
fatorData(LocalDate dataVencimento)
Retorna o Fator Vencimento com base na data informada.
|
static String |
geraDigitoNossoNumero(String nossoNumero)
Retorna o Dígito do nosso número.
|
static Integer |
modulo10Banrisul(String codigo) |
static String |
modulo11Banrisul(String codigo,
Integer digitoModulo10) |
static String |
modulo11Dac(String linha) |
static String |
transformarObjetoParaXml(Object objeto,
String tipo)
Transforma um Objeto em String no formato XML.
|
static <T> T |
transformarXmlParaObjeto(String xml,
Class<T> classe)
Transforma uma String no formato XML em um Objeto.
|
public static String transformarObjetoParaXml(Object objeto, String tipo) throws Exception
Transforma um Objeto em String no formato XML.
objeto - Object a ser transformadotipo - String com o tipo do ObjetoExceptionpublic static <T> T transformarXmlParaObjeto(String xml, Class<T> classe) throws JAXBException
Transforma uma String no formato XML em um Objeto.
xml - String no formato XML a ser transformadaclasse - ClassJAXBExceptionpublic static String extrairNoXmlRetorno(String xml) throws ParserConfigurationException, IOException, SAXException, TransformerException
Extrai nó dados do xml de retorno.
xml - String no formato XMLParserConfigurationExceptionIOExceptionSAXExceptionTransformerExceptionpublic static String comunicacaoHttpsURLConnection(String envelopeSoap, ConfiguracaoBanrisulAPI configuracao) throws IOException
Comunicação com o WebService.
envelopeSoap - String contendo um XML de envioconfiguracao - ConfiguracaoBanrisulAPI contendo as configuraçõesIOExceptionpublic static String fatorData(LocalDate dataVencimento)
Retorna o Fator Vencimento com base na data informada.
dataVencimento - LocalDate contendo a data de vencimentopublic static String geraDigitoNossoNumero(String nossoNumero)
Retorna o Dígito do nosso número.
nossoNumero - String nosso número (De controle do emitente)Copyright © 2022. All rights reserved.