• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #6582

17 Jul 2025 09:30PM UTC coverage: 51.231% (+24.2%) from 26.996%
#6582

push

web-flow
Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e (#1054)

* Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e

* Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e

14006 of 27339 relevant lines covered (51.23%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/fincatto/documentofiscal/mdfe3/classes/MDFAutorizador3.java
1
package com.fincatto.documentofiscal.mdfe3.classes;
2

3
import com.fincatto.documentofiscal.DFAmbiente;
4
import com.fincatto.documentofiscal.DFUnidadeFederativa;
5

6
import java.util.Arrays;
7

8
/**
9
 * <h1>URLs dos serviços para MDF-e</h1><br>
10
 *
11
 * @Author Eldevan Nery Junior on 26/05/17.
12
 *
13
 * <p>Pela minha pesquisa, atualmente o serviço de MDF-e encontra-se apenas no  <a href="https://mdfe-portal.sefaz.rs.gov.br/Site/Servicos">RIO GRANDE DO SUL </a>.
14
 * veja no: <a href="https://www.fazenda.sp.gov.br/mdfe/url_webservices/url_webservices.htm"> link SP</a>
15
 *  e <a href="http://boletim.fazenda.pr.gov.br/boletins/item/2015/34"> link PR</a>
16
 *  <p/>
17
 *
18
 *
19
 */
20
public enum MDFAutorizador3 {
×
21

22
    RS {
×
23
        @Override
24
        public String getMDFeRecepcao(DFAmbiente ambiente) {
25
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
26
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFerecepcao/MDFeRecepcao.asmx"
×
27
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFerecepcao/MDFeRecepcao.asmx";
×
28
        }
29
        
30
        @Override
31
        public String getMDFeRecepcaoSinc(DFAmbiente ambiente) {
32
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
33
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeRecepcaoSinc/MDFeRecepcaoSinc.asmx"
×
34
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeRecepcaoSinc/MDFeRecepcaoSinc.asmx";
×
35
        }
36

37
        @Override
38
        public String getMDFeRetornoRecepcao(DFAmbiente ambiente) {
39
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
40
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeRetRecepcao/MDFeRetRecepcao.asmx"
×
41
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeRetRecepcao/MDFeRetRecepcao.asmx";
×
42
        }
43

44
        @Override
45
        public String getMDFeRecepcaoEvento(DFAmbiente ambiente) {
46
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
47
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeRecepcaoEvento/MDFeRecepcaoEvento.asmx"
×
48
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeRecepcaoEvento/MDFeRecepcaoEvento.asmx";
×
49
        }
50

51
        @Override
52
        public String getMDFeStatusServico(DFAmbiente ambiente) {
53
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
54
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeStatusServico/MDFeStatusServico.asmx"
×
55
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeStatusServico/MDFeStatusServico.asmx";
×
56
        }
57

58
        @Override
59
        public String getMDFeConsulta(DFAmbiente ambiente) {
60
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
61
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeConsulta/MDFeConsulta.asmx"
×
62
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeConsulta/MDFeConsulta.asmx";
×
63
        }
64

65
        @Override
66
        public String getMDFeConsNaoEnc(DFAmbiente ambiente) {
67
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
68
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeConsNaoEnc/MDFeConsNaoEnc.asmx"
×
69
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeConsNaoEnc/MDFeConsNaoEnc.asmx";
×
70
        }
71

72
        @Override
73
        public String getMDFeDistribuicao(DFAmbiente ambiente) {
74
            return DFAmbiente.HOMOLOGACAO.equals(ambiente)
×
75
                    ? "https://mdfe-homologacao.svrs.rs.gov.br/ws/MDFeDistribuicaoDFe/MDFeDistribuicaoDFe.asmx"
×
76
                    : "https://mdfe.svrs.rs.gov.br/ws/MDFeDistribuicaoDFe/MDFeDistribuicaoDFe.asmx";
×
77
        }
78

79
        @Override
80
        public DFUnidadeFederativa[] getUFs() {
81
            return new DFUnidadeFederativa[]{DFUnidadeFederativa.RS};
×
82
        }
83
    };
84

85
    public abstract String getMDFeRecepcao(final DFAmbiente ambiente);
86
    
87
    public abstract String getMDFeRecepcaoSinc(final DFAmbiente ambiente);
88

89
    public abstract String getMDFeRetornoRecepcao(final DFAmbiente ambiente);
90

91
    public abstract String getMDFeRecepcaoEvento(final DFAmbiente ambiente);
92

93
    public abstract String getMDFeStatusServico(final DFAmbiente ambiente);
94

95
    public abstract String getMDFeConsulta(final DFAmbiente ambiente);
96

97
    public abstract String getMDFeConsNaoEnc(final DFAmbiente ambiente);
98
    
99
    public abstract String getMDFeDistribuicao(final DFAmbiente ambiente);
100

101
    public abstract DFUnidadeFederativa[] getUFs();
102

103
    /**
104
     * Retorna url do Estado ou o padrão (RS)
105
     * Se no futuro surgir novas URL'S para determinado Estado
106
     *  só implementar o enum correspondente.
107
     * @param uf
108
     * @return
109
     */
110
    public static MDFAutorizador3 valueOfCodigoUF(final DFUnidadeFederativa uf) {
111
        for (final MDFAutorizador3 autorizador : MDFAutorizador3.values()) {
×
112
            if (Arrays.asList(autorizador.getUFs()).contains(uf)) {
×
113
                return autorizador;
×
114
            }
115
        }
116
        return RS;
×
117
//        throw new IllegalStateException(String.format("N\u00e3o existe autorizador para a UF %s", uf.getCodigo()));
118
    }
119

120
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc