Rev 414 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 414 | Rev 415 | ||
|---|---|---|---|
| Line 2... | Line 2... | ||
| 2 | *
|
2 | *
|
| 3 | */
|
3 | */
|
| 4 | package br.com.swconsultoria.nfe.util; |
- | |
| - | 4 | package nfe.util; |
|
| 5 | 5 | ||
| 6 | import br.com.swconsultoria.nfe.exception.NfeException; |
6 | import br.com.swconsultoria.nfe.exception.NfeException; |
| 7 | import br.com.swconsultoria.nfe.schema.consCad.TConsCad; |
7 | import br.com.swconsultoria.nfe.schema.consCad.TConsCad; |
| 8 | import br.com.swconsultoria.nfe.schema.distdfeint.DistDFeInt; |
8 | import br.com.swconsultoria.nfe.schema.distdfeint.DistDFeInt; |
| 9 | import br.com.swconsultoria.nfe.schema.envEventoCancNFe.TEnvEvento; |
9 | import br.com.swconsultoria.nfe.schema.envEventoCancNFe.TEnvEvento; |
| Line 36... | Line 36... | ||
| 36 | import java.time.ZoneId; |
36 | import java.time.ZoneId; |
| 37 | import java.util.Base64; |
37 | import java.util.Base64; |
| 38 | import java.util.GregorianCalendar; |
38 | import java.util.GregorianCalendar; |
| 39 | import java.util.List; |
39 | import java.util.List; |
| 40 | import java.util.StringJoiner; |
40 | import java.util.StringJoiner; |
| - | 41 | import java.util.logging.Logger; |
|
| 41 | import java.util.zip.GZIPInputStream; |
42 | import java.util.zip.GZIPInputStream; |
| 42 | 43 | ||
| 43 | /**
|
44 | /**
|
| 44 | * Classe Responsavel por Metodos referentes ao XML
|
45 | * Classe Responsavel por Metodos referentes ao XML
|
| 45 | *
|
46 | *
|
| Line 93... | Line 94... | ||
| 93 | private static final String RET_ATOR_INTERESSADO = "br.com.swconsultoria.nfe.schema.envEventoAtorInteressado.TRetEnvEvento"; |
94 | private static final String RET_ATOR_INTERESSADO = "br.com.swconsultoria.nfe.schema.envEventoAtorInteressado.TRetEnvEvento"; |
| 94 | private static final String RET_CANCELAR_SUBSTITUICAO = "br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento"; |
95 | private static final String RET_CANCELAR_SUBSTITUICAO = "br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento"; |
| 95 | private static final String RET_CCE = "br.com.swconsultoria.nfe.schema.envcce.TRetEnvEvento"; |
96 | private static final String RET_CCE = "br.com.swconsultoria.nfe.schema.envcce.TRetEnvEvento"; |
| 96 | private static final String RET_EPEC = "br.com.swconsultoria.nfe.schema.envEpec.TRetEnvEvento"; |
97 | private static final String RET_EPEC = "br.com.swconsultoria.nfe.schema.envEpec.TRetEnvEvento"; |
| 97 | private static final String RET_MANIFESTAR = "br.com.swconsultoria.nfe.schema.envConfRecebto.TRetEnvEvento"; |
98 | private static final String RET_MANIFESTAR = "br.com.swconsultoria.nfe.schema.envConfRecebto.TRetEnvEvento"; |
| - | 99 | ||
| - | 100 | private final static Logger logger = Logger.getLogger(WebServiceUtil.class.getName()); |
|
| 98 | 101 | ||
| 99 | /**
|
102 | /**
|
| 100 | * Transforma o String do XML em Objeto
|
103 | * Transforma o String do XML em Objeto
|
| 101 | *
|
104 | *
|
| 102 | * @param xml
|
105 | * @param xml
|
| Line 417... | Line 420... | ||
| 417 | XMLGregorianCalendar xmlCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar); |
420 | XMLGregorianCalendar xmlCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar); |
| 418 | xmlCalendar.setMillisecond(DatatypeConstants.FIELD_UNDEFINED); |
421 | xmlCalendar.setMillisecond(DatatypeConstants.FIELD_UNDEFINED); |
| 419 | return xmlCalendar.toString(); |
422 | return xmlCalendar.toString(); |
| 420 | 423 | ||
| 421 | } catch (DatatypeConfigurationException e) { |
424 | } catch (DatatypeConfigurationException e) { |
| 422 | log.warning(e.getMessage()); |
- | |
| - | 425 | logger.warning(e.getMessage()); |
|
| 423 | }
|
426 | }
|
| 424 | return null; |
427 | return null; |
| 425 | }
|
428 | }
|
| 426 | 429 | ||
| 427 | public static byte[] geraHashCSRT(String chave, String csrt) throws NoSuchAlgorithmException { |
430 | public static byte[] geraHashCSRT(String chave, String csrt) throws NoSuchAlgorithmException { |