Subversion Repositories Integrator Subversion

Rev

Rev 126 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
106 espaco 1
package br.com.ec.domain.model;
2
 
3
import java.io.ByteArrayInputStream;
4
import java.io.ByteArrayOutputStream;
5
import java.io.IOException;
6
import java.io.Serializable;
7
import java.io.StringReader;
8
import java.util.Date;
9
import java.util.List;
10
 
11
import javax.persistence.Column;
12
import javax.persistence.Entity;
13
import javax.persistence.GeneratedValue;
14
import javax.persistence.GenerationType;
15
import javax.persistence.Id;
16
import javax.persistence.JoinColumn;
17
import javax.persistence.ManyToOne;
18
import javax.persistence.SequenceGenerator;
19
import javax.persistence.Table;
20
import javax.persistence.Transient;
21
import javax.validation.constraints.NotNull;
22
import javax.validation.constraints.Size;
23
import javax.xml.bind.JAXBContext;
24
import javax.xml.bind.JAXBException;
25
import javax.xml.bind.Unmarshaller;
26
import javax.xml.parsers.DocumentBuilder;
27
import javax.xml.parsers.DocumentBuilderFactory;
28
import javax.xml.transform.Transformer;
29
import javax.xml.transform.TransformerFactory;
30
import javax.xml.transform.dom.DOMSource;
31
import javax.xml.transform.stream.StreamResult;
32
import javax.xml.transform.stream.StreamSource;
33
 
34
import org.apache.commons.io.IOUtils;
35
import org.hibernate.annotations.ForeignKey;
36
import org.primefaces.model.DefaultStreamedContent;
37
import org.w3c.dom.Document;
38
 
39
import br.com.ec.domain.model.tipos.TipoModeloNotaFiscal;
40
import br.com.ec.domain.model.tipos.TipoNotaFiscal;
41
import br.edu.cesmac.core.exception.NegocioException;
42
import br.edu.cesmac.core.generic.identidade.Identidade;
43
import br.edu.cesmac.core.interfaces.Alterar;
44
import br.edu.cesmac.core.interfaces.Cadastrar;
45
import br.edu.cesmac.core.util.StringUtil;
46
import br.edu.cesmac.core.util.VerificadorUtil;
47
import br.edu.cesmac.relatorio.util.RelatorioUtils;
48
import br.edu.cesmac.web.util.DataUtil;
49
import nfce.java.TNfeProc;
50
 
51
@Entity
52
@Table(name="sec_nota_fiscal", schema="sc_sec")
53
public class NotaFiscal implements Serializable, Identidade {
54
 
55
        private static final long serialVersionUID = 1L;
56
 
57
        private Long sequencial;
58
        private Long numeroNotaFiscal;
59
        private String chave;
60
        private String serie;
61
        private Venda venda;
62
        private Pessoa pessoaJuridicaEmitente;
63
        private Pessoa pessoaJuridicaDestinatario;
64
        private String observacaoVenda;
65
//      private Transporte transporte;
66
        private String descricaoComplementares;
67
        private Date dataHoraEmissao;
68
        private String textoXml;
69
        private String tipoNotaFiscal;
70
        private String tipoModeloNotaFiscal;
71
        private String protocoloAutorizacao;
72
        private String caminhoQrcode;
73
 
74
        private String statusRetorno;
75
        private String motivoRetorno;
76
        private Date dataHoraEvento;
77
        private String textoXmlEvento;
78
 
79
        private List<NotaFiscalProduto> listaNFRemessaProdutos;
80
 
81
        private byte[] arquivoXml;
82
 
83
        private List<Parcela> listaParcelas;
84
        private List<CompraProduto> listaCompraProduto;
85
        private List<Lancamento> listaLancamento;
86
        private List<VendaFormaPagamento> listaFormaPagamento;
87
 
88
        private Boolean notaFiscalPendente;
89
 
90
        @Override
91
        @Transient
92
        public Object getId() {
93
                return this.getSequencial();
94
        }
95
        @Override
96
        public void setId(Object id) {
97
                this.sequencial = (Long) id;
98
        }
99
 
100
        @Id
101
        @SequenceGenerator(name = "sq_notafiscal")
102
        @GeneratedValue(strategy = GenerationType.IDENTITY)
103
        @Column(name="seq_nota_fiscal", nullable=false)
104
        public Long getSequencial() {
105
                return sequencial;
106
        }
107
        public void setSequencial(Long sequencial) {
108
                this.sequencial = sequencial;
109
        }
110
 
111
        @Column(name="cod_nota_fiscal")
112
        public String getChave() {
113
                return chave;
114
        }
115
        public void setChave(String chave) {
116
                this.chave = chave;
117
        }
118
 
119
        @Column(name="dsc_serie")
120
        public String getSerie() {
121
                return serie;
122
        }
123
        public void setSerie(String serie) {
124
                this.serie = serie;
125
        }
126
 
127
        @Column(name="num_nota_fiscal", nullable=false)
128
        public Long getNumeroNotaFiscal() {
129
                return numeroNotaFiscal;
130
        }
131
        public void setNumeroNotaFiscal(Long numeroNotaFiscal) {
132
                this.numeroNotaFiscal = numeroNotaFiscal;
133
        }
134
 
135
        @ManyToOne
136
        @ForeignKey(name = "fk_notafiscal_venda")
137
        @JoinColumn(name="seq_venda", referencedColumnName="seq_venda", insertable=true, updatable=false)
138
        public Venda getVenda() {
139
                return venda;
140
        }
141
        public void setVenda(Venda venda) {
142
                this.venda = venda;
143
        }
144
 
145
        @ManyToOne
146
        @ForeignKey(name = "fk_notafiscal_emitente")
147
        @JoinColumn(name="seq_pessoa_emitente", referencedColumnName="seq_pessoa", insertable=true, updatable=true)
148
        public Pessoa getPessoaJuridicaEmitente() {
149
                return pessoaJuridicaEmitente;
150
        }
151
        public void setPessoaJuridicaEmitente(Pessoa pessoaJuridicaEmitente) {
152
                this.pessoaJuridicaEmitente = pessoaJuridicaEmitente;
153
        }
154
 
155
        @ManyToOne
156
        @ForeignKey(name = "fk_notafiscal_destinatario")
157
        @JoinColumn(name="seq_pessoa_destinatario", referencedColumnName="seq_pessoa", insertable=true, updatable=true)
158
        public Pessoa getPessoaJuridicaDestinatario() {
159
                return pessoaJuridicaDestinatario;
160
        }
161
        public void setPessoaJuridicaDestinatario(Pessoa pessoaJuridicaDestinatario) {
162
                this.pessoaJuridicaDestinatario = pessoaJuridicaDestinatario;
163
        }
164
 
165
        @Column(name="dsc_obs_venda")
166
        @Size(max = 100, message = "Limite de caracteres ultrapassado: Observação da Venda")
167
        public String getObservacaoVenda() {
168
                return observacaoVenda;
169
        }
170
        public void setObservacaoVenda(String observacaoVenda) {
171
                this.observacaoVenda = observacaoVenda;
172
        }
173
 
174
        @Column(name="dsc_complementares")
175
        @Size(max = 1500, message = "Limite de caracteres ultrapassado: Descrição Complementares")
176
        public String getDescricaoComplementares() {
177
                return descricaoComplementares;
178
        }
179
        public void setDescricaoComplementares(String descricaoComplementares) {
180
                this.descricaoComplementares = descricaoComplementares;
181
        }
182
 
183
        @Column(name="dth_emissao", nullable=false)
184
        public Date getDataHoraEmissao() {
185
                return dataHoraEmissao;
186
        }
187
        public void setDataHoraEmissao(Date dataHoraEmissao) {
188
                this.dataHoraEmissao = dataHoraEmissao;
189
        }
190
 
191
        @Column(name="txt_xml")
192
        public String getTextoXml() {
193
                return textoXml;
194
        }
195
        public void setTextoXml(String textoXml) {
196
                this.textoXml = textoXml;
197
        }
198
 
199
        @Column(name="tip_nota_fiscal", nullable=false)
200
        @NotNull(message="Obrigatório informar o tipo da nota fiscal", groups={Cadastrar.class, Alterar.class})
201
        public String getTipoNotaFiscal() {
202
                return tipoNotaFiscal;
203
        }
204
        public void setTipoNotaFiscal(String tipoNotaFiscal) {
205
                this.tipoNotaFiscal = tipoNotaFiscal;
206
        }
207
        @Transient
208
        public String getDescricaoDoTipoNotaFiscal() {
209
                return VerificadorUtil.naoEstaNuloOuVazio(getTipoNotaFiscal())? TipoNotaFiscal.parse(getTipoNotaFiscal()).getDescricao() : null;
210
        }
211
 
212
        @Column(name="tip_modelo_notafiscal", nullable=false)
213
        @NotNull(message="Obrigatório informar o tipo do modelo da nota fiscal", groups={Cadastrar.class, Alterar.class})
214
        public String getTipoModeloNotaFiscal() {
215
                return tipoModeloNotaFiscal;
216
        }
217
        public void setTipoModeloNotaFiscal(String tipoModeloNotaFiscal) {
218
                this.tipoModeloNotaFiscal = tipoModeloNotaFiscal;
219
        }
220
        @Transient
221
        public String getDescricaoDoTipoModeloNotaFiscal() {
222
                return VerificadorUtil.naoEstaNuloOuVazio(getTipoModeloNotaFiscal())? TipoModeloNotaFiscal.parse(getTipoModeloNotaFiscal()).getDescricao() : null;
223
        }
224
 
225
        @Column(name="dsc_protocolo_autorizacao")
226
        @Size(max = 100, message = "Limite de caracteres ultrapassado: Protocolo da Autorização")
227
        public String getProtocoloAutorizacao() {
228
                return protocoloAutorizacao;
229
        }
230
        public void setProtocoloAutorizacao(String protocoloAutorizacao) {
231
                this.protocoloAutorizacao = protocoloAutorizacao;
232
        }
233
 
234
        @Column(name="dsc_caminho_qrcode")
235
        @Size(max = 500, message = "Limite de caracteres ultrapassado: Caminho QRCode")
236
        public String getCaminhoQrcode() {
237
                return caminhoQrcode;
238
        }
239
        public void setCaminhoQrcode(String caminhoQrcode) {
240
                this.caminhoQrcode = caminhoQrcode;
241
        }
242
 
243
        @Column(name="dsc_status_retorno")
244
        @Size(max = 100, message = "Limite de caracteres ultrapassado: Status do Retorno")
245
        public String getStatusRetorno() {
246
                return statusRetorno;
247
        }
248
        public void setStatusRetorno(String statusRetorno) {
249
                this.statusRetorno = statusRetorno;
250
        }
251
 
252
        @Column(name="dsc_motivo_retorno")
253
        @Size(max = 100, message = "Limite de caracteres ultrapassado: Motivo do Retorno")
254
        public String getMotivoRetorno() {
255
                return motivoRetorno;
256
        }
257
        public void setMotivoRetorno(String motivoRetorno) {
258
                this.motivoRetorno = motivoRetorno;
259
        }
260
 
261
        @Column(name="dth_evento")
262
        public Date getDataHoraEvento() {
263
                return dataHoraEvento;
264
        }
265
        public void setDataHoraEvento(Date dataHoraEvento) {
266
                this.dataHoraEvento = dataHoraEvento;
267
        }
268
 
269
        @Column(name="txt_xml_evento", nullable=false)
270
        public String getTextoXmlEvento() {
271
                return textoXmlEvento;
272
        }
273
        public void setTextoXmlEvento(String textoXmlEvento) {
274
                this.textoXmlEvento = textoXmlEvento;
275
        }
276
 
277
//      @OneToMany(mappedBy="notaFiscal", cascade=CascadeType.ALL, orphanRemoval=true)
278
        @Transient
279
        public List<NotaFiscalProduto> getListaNFRemessaProdutos() {
280
                return listaNFRemessaProdutos;
281
        }
282
        public void setListaNFRemessaProdutos(List<NotaFiscalProduto> listaNFRemessaProdutos) {
283
                this.listaNFRemessaProdutos = listaNFRemessaProdutos;
284
        }
285
 
286
        @Transient
287
        public Boolean temPessoaJuridica() {
288
                if (VerificadorUtil.estaNulo(getVenda())) return false;
289
                if (VerificadorUtil.estaNulo(getVenda().getLoja())) return false;
290
                return VerificadorUtil.naoEstaNulo(getVenda().getLoja().getPessoaJuridica());
291
        }
292
 
293
        @Transient
294
        public String getRazaoSocialDaLoja() {
295
                return temPessoaJuridica()? getVenda().getLoja().getPessoaJuridica().getRazaoSocial() : "";
296
        }
297
 
298
        @Transient
299
        public String getCnpjDaLoja() {
300
                return temPessoaJuridica()? StringUtil.formatarCnpj(getVenda().getLoja().getPessoaJuridica().getCpfCnpj()) : "";
301
        }
302
 
303
        @Transient
304
        public byte[] getArquivoXml() {
305
                return arquivoXml;
306
        }
307
        public void setArquivoXml(byte[] arquivoXml) {
308
                this.arquivoXml = arquivoXml;
309
        }
310
 
311
        @Transient
312
        public List<Parcela> getListaParcelas() {
313
                return listaParcelas;
314
        }
315
        public void setListaParcelas(List<Parcela> listaParcelas) {
316
                this.listaParcelas = listaParcelas;
317
        }
318
 
319
        @Transient
320
        public List<CompraProduto> getListaCompraProduto() {
321
                return listaCompraProduto;
322
        }
323
        public void setListaCompraProduto(List<CompraProduto> listaCompraProduto) {
324
                this.listaCompraProduto = listaCompraProduto;
325
        }
326
 
327
        @Transient
328
        public List<Lancamento> getListaLancamento() {
329
                return listaLancamento;
330
        }
331
        public void setListaLancamento(List<Lancamento> listaLancamento) {
332
                this.listaLancamento = listaLancamento;
333
        }
334
 
335
        @Transient
336
        public List<VendaFormaPagamento> getListaFormaPagamento() {
337
                return listaFormaPagamento;
338
        }
339
        public void setListaFormaPagamento(List<VendaFormaPagamento> listaFormaPagamento) {
340
                this.listaFormaPagamento = listaFormaPagamento;
341
        }
342
 
343
        @Transient
344
        public Boolean getNotaFiscalPendente() {
345
                return notaFiscalPendente;
346
        }
347
        public void setNotaFiscalPendente(Boolean notaFiscalPendente) {
348
                this.notaFiscalPendente = notaFiscalPendente;
349
        }
350
 
351
        @Override
352
        public int hashCode() {
353
                final int prime = 31;
354
                int result = 1;
355
                result = prime * result + ((chave == null) ? 0 : chave.hashCode());
356
                return result;
357
        }
358
 
359
        @Override
360
        public boolean equals(Object obj) {
361
                if (this == obj)
362
                        return true;
363
                if (obj == null)
364
                        return false;
365
                if (getClass() != obj.getClass())
366
                        return false;
367
                NotaFiscal other = (NotaFiscal) obj;
368
                if (chave == null) {
369
                        if (other.chave != null)
370
                                return false;
371
                } else if (!chave.equals(other.chave))
372
                        return false;
373
                return true;
374
        }
375
 
376
        @Transient
377
        public Double getTotalLancamentos() {
378
                Double total = 0.0;
379
                if (!VerificadorUtil.isListaNulaOuVazia(getListaLancamento())) {
380
                        for (Lancamento lancamento : getListaLancamento()) {
381
                                total = total + lancamento.getValorVenda();
382
                        }
383
                }
384
                return total;  
385
        }
386
 
387
        @Transient
388
        public Double getTotalPago() {
389
                Double total = 0.0;
390
                if (!VerificadorUtil.isListaNulaOuVazia(getListaFormaPagamento())) {
391
                        for (VendaFormaPagamento vendaFormaPagamento : getListaFormaPagamento()) {
392
                                total = total + vendaFormaPagamento.getValorPagamento();
393
                        }
394
                }
395
                return total;  
396
        }
397
 
398
        @Transient
399
        public Double getValorNotaFiscal() {
400
                if (VerificadorUtil.naoEstaNuloOuVazio(getTextoXml())) {
401
                        if (getTextoXml().indexOf("<vNF>") > 0) {
402
                                String valorLocalizado = getTextoXml().substring(getTextoXml().indexOf("<vNF>"), getTextoXml().indexOf("</vNF>"))
403
                                                                                        .replace("<vNF>", "").replace("</vNF>", "");
404
                                return new Double(valorLocalizado);
405
                        }
406
                }
407
                return 0.0;
408
        }
409
 
410
        @Transient
411
        public Double getTotalValorProdutosRemessa() {
412
                Double total = new Double(0.0);
413
                if (VerificadorUtil.naoEstaNuloOuVazio(getListaNFRemessaProdutos())) {
414
                        for (NotaFiscalProduto notaFiscalProduto : getListaNFRemessaProdutos()) {
415
                                total = total + notaFiscalProduto.getProduto().getValorCompra() * notaFiscalProduto.getQuantidade();
416
                        }
417
                }
418
                return total;
419
        }
420
 
421
        @Transient
422
        public Boolean ehNotaFiscalDeRemessa() {
423
                return VerificadorUtil.naoEstaNulo(getTipoNotaFiscal()) ? getTipoNotaFiscal().equals(TipoNotaFiscal.NFE_REMESSA.getValor()) : false;
424
        }
425
 
426
        @Transient
427
        public byte[] criarArquivoXml() {
428
                ByteArrayInputStream in = null;
429
                ByteArrayOutputStream bos = null;
430
                try {
431
                        in = new ByteArrayInputStream(getTextoXml().getBytes());
432
                        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
433
                        DocumentBuilder builder = dbf.newDocumentBuilder();
434
                        Document xml = builder.parse(in);
435
 
436
                        bos = new ByteArrayOutputStream();
437
                        TransformerFactory transformerFactory = TransformerFactory.newInstance();
438
                        Transformer transformer = transformerFactory.newTransformer();
439
                        DOMSource source = new DOMSource(xml);
440
                        StreamResult result = new StreamResult(bos);
441
                        transformer.transform(source, result);
442
 
443
                        DefaultStreamedContent arquivo = (DefaultStreamedContent) RelatorioUtils.gerarArquivo(bos.toByteArray(), "ArquivoXML", "xml");
444
                        return IOUtils.toByteArray(arquivo.getStream());
445
                } catch (Exception e) {
446
                        e.printStackTrace();
447
                } finally {
448
                        try {
449
                                in.close();
450
                                bos.close();
451
                        } catch (IOException e) {
452
                                e.printStackTrace();
453
                        }
454
                }
455
                return null;
456
        }
457
 
458
        @Transient
459
        public byte[] getRetornarArquivoXml() {
460
                setArquivoXml(criarArquivoXml());
461
                return getArquivoXml();
462
        }
463
 
464
        @Transient
465
        public void gerarChaveAcessoNfe(String codigoUFEmitente, String dataAAMM, String cnpjCpfEmitente, String modeloNf,
466
                        String serieNF, String tpEmissao, String numeroNF) {
467
                try {
468
            StringBuilder chave = new StringBuilder();
469
            chave.append(StringUtil.lpadTo(codigoUFEmitente, 2, '0'));
470
            chave.append(StringUtil.lpadTo(dataAAMM, 4, '0'));
471
            chave.append(StringUtil.lpadTo(cnpjCpfEmitente.replaceAll("\\D",""), 14, '0'));
472
            chave.append(StringUtil.lpadTo(modeloNf, 2, '0'));
473
            chave.append(StringUtil.lpadTo(serieNF, 3, '0'));
474
            chave.append(StringUtil.lpadTo(String.valueOf(numeroNF), 9, '0'));
475
            chave.append(StringUtil.lpadTo(tpEmissao, 1, '0'));
476
            chave.append(StringUtil.lpadTo(numeroNF, 8, '0'));
477
            chave.append(StringUtil.modulo11(chave.toString()));
478
            chave.insert(0, "NFe");
479
            setChave(chave.toString());
480
        } catch (Exception e) {
481
                System.out.println(e.toString());
482
                throw new NegocioException(e.getMessage());
483
        }
484
        }
485
 
486
        @Transient
487
        public Long getSequencialDaVenda() {
488
                return VerificadorUtil.naoEstaNulo(getVenda())? getVenda().getSequencial() : null;
489
        }
490
 
491
        @Transient
492
        public void preencherNumeroPelaChave() {
493
                if (VerificadorUtil.naoEstaNuloOuVazio(getChave())) {
494
                        setNumeroNotaFiscal(new Long(getChave().substring(25, 34)));
495
                }
496
        }
497
 
498
        @Transient
499
        public void preencherMotivoPadrao() {
500
                setMotivoRetorno("Autorizado o uso da NF-e");
501
        }
502
 
503
        @Transient
504
        public void preencherSeriePadrao() {
505
                setSerie("1");
506
        }
507
 
508
        @Transient
509
        public void preencherStatusPadrao() {
510
                setStatusRetorno("100");
511
        }
512
 
513
        @Transient
514
        public void preencherQRCodePadrao() {
515
                setCaminhoQrcode("http://nfce.sefaz.al.gov.br/QRCode/consultarNFCe.jsp?p=" + getChave() + "|2|1|1|437A52AD9DE9BDD04D6BFF55ED997C5199ECC64D");
516
        }
517
 
518
        @Transient
519
        public String retornarCodigoNumerico() {
520
                if (VerificadorUtil.naoEstaNuloOuVazio(getChave())) {
521
                        if (getChave().length() > 42) {
522
                                return getChave().substring(35, 43);
523
                        }
524
                }
525
                return "";
526
        }
527
 
528
        @Transient
529
        public void preencherComXML() {
530
                if (VerificadorUtil.naoEstaNuloOuVazio(this.getTextoXml())) {
531
                        TNfeProc tNfeProc = unmarshal(this.getTextoXml());
532
                        preencher(tNfeProc);
533
                }
534
 
535
        }
536
 
537
        @Transient
538
        public void preencher(TNfeProc nfeProc) {
539
                if (VerificadorUtil.naoEstaNulo(nfeProc)) {
540
                        if (VerificadorUtil.naoEstaNulo(nfeProc.getNFe())) {
541
                                if (VerificadorUtil.naoEstaNulo(nfeProc.getNFe().getInfNFe())) {
542
                                        if (VerificadorUtil.naoEstaNulo(nfeProc.getNFe().getInfNFe().getIde())) {
543
                                                //this.setCodigoNotaFiscal(new Long(nfeProc.getNFe().getInfNFe().getIde().getCNF()));
544
                                                this.setNumeroNotaFiscal(new Long(nfeProc.getNFe().getInfNFe().getIde().getNNF()));
545
                                                this.setSerie(nfeProc.getNFe().getInfNFe().getIde().getSerie());
546
                                                this.setDataHoraEmissao(DataUtil.retornarDataApartirString("yyyy-MM-dd'T'HH:mm:ss", nfeProc.getNFe().getInfNFe().getIde().getDhEmi()));
547
                                        }
548
                                        if (VerificadorUtil.naoEstaNulo(nfeProc.getNFe().getInfNFe().getInfAdic())) {
549
                                                this.setDescricaoComplementares(nfeProc.getNFe().getInfNFe().getInfAdic().getInfCpl());
550
                                        }
551
                                }
552
                                if (VerificadorUtil.naoEstaNulo(nfeProc.getNFe().getInfNFeSupl())) {}
553
                                if (VerificadorUtil.naoEstaNulo(nfeProc.getNFe().getSignature())) {}
554
                        }
555
                        if (VerificadorUtil.naoEstaNulo(nfeProc.getProtNFe())) {
556
                                if (VerificadorUtil.naoEstaNulo(nfeProc.getProtNFe().getInfProt())) {
557
                                        this.setChave(nfeProc.getProtNFe().getInfProt().getChNFe());
558
                                        this.setDataHoraEvento(DataUtil.retornarDataApartirString("yyyy-MM-dd'T'HH:mm:ss", nfeProc.getProtNFe().getInfProt().getDhRecbto()));
559
                                        this.setProtocoloAutorizacao(nfeProc.getProtNFe().getInfProt().getNProt());
560
                                        this.setStatusRetorno(nfeProc.getProtNFe().getInfProt().getCStat());
561
                                        this.setMotivoRetorno(nfeProc.getProtNFe().getInfProt().getXMotivo());
562
                                }
563
                        }
564
                }
565
        }
566
 
567
        @Transient
568
        public TNfeProc unmarshal(String stringXml) {
569
        JAXBContext context = null;
570
        try {
571
            context = JAXBContext.newInstance(nfce.java.TNfeProc.class);
572
            Unmarshaller unmarshaller = context.createUnmarshaller();
573
            return (TNfeProc) unmarshaller.unmarshal(new StreamSource(new StringReader(stringXml)));
574
        } catch (JAXBException e) {
575
            e.printStackTrace();
576
        }
577
        return null;
578
    }
579
 
580
}