nfse_sjc 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +4 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE +22 -0
  8. data/README.md +130 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +7 -0
  11. data/bin/setup +7 -0
  12. data/etc/codegen/_signature.xml.erb +22 -0
  13. data/etc/codegen/cabecalho_v3.xml.erb +6 -0
  14. data/etc/codegen/cancelar_nfse_v3.xml.erb +21 -0
  15. data/etc/codegen/consultar_lote_rps_v3.xml.erb +15 -0
  16. data/etc/codegen/consultar_nfse_rps_v3.xml.erb +18 -0
  17. data/etc/codegen/consultar_nfse_v3.xml.erb +58 -0
  18. data/etc/codegen/consultar_situacao_lote_rps_v3.xml.erb +15 -0
  19. data/etc/codegen/recepcionar_lote_rps_v3.xml.erb +188 -0
  20. data/etc/schemas/cabecalho_v03.xsd +16 -0
  21. data/etc/schemas/servico_cancelar_nfse_envio_v03.xsd +19 -0
  22. data/etc/schemas/servico_cancelar_nfse_resposta_v03.xsd +13 -0
  23. data/etc/schemas/servico_consultar_lote_rps_envio_v03.xsd +23 -0
  24. data/etc/schemas/servico_consultar_lote_rps_resposta_v03.xsd +18 -0
  25. data/etc/schemas/servico_consultar_nfse_envio_v03.xsd +26 -0
  26. data/etc/schemas/servico_consultar_nfse_resposta_v03.xsd +19 -0
  27. data/etc/schemas/servico_consultar_nfse_rps_envio_v03.xsd +23 -0
  28. data/etc/schemas/servico_consultar_nfse_rps_resposta_v03.xsd +13 -0
  29. data/etc/schemas/servico_consultar_situacao_lote_rps_envio_v03.xsd +17 -0
  30. data/etc/schemas/servico_consultar_situacao_lote_rps_resposta_v03.xsd +16 -0
  31. data/etc/schemas/servico_enviar_lote_rps_envio_v03.xsd +14 -0
  32. data/etc/schemas/servico_enviar_lote_rps_resposta_v03.xsd +25 -0
  33. data/etc/schemas/tipos_v03.xsd +545 -0
  34. data/etc/schemas/xmldsig-core-schema20020212_v03.xsd +316 -0
  35. data/lib/nfse_sjc.rb +22 -0
  36. data/lib/nfse_sjc/client.rb +49 -0
  37. data/lib/nfse_sjc/config.rb +31 -0
  38. data/lib/nfse_sjc/dirs.rb +23 -0
  39. data/lib/nfse_sjc/document.rb +67 -0
  40. data/lib/nfse_sjc/errors/validation_error.rb +6 -0
  41. data/lib/nfse_sjc/parser.rb +15 -0
  42. data/lib/nfse_sjc/response_hash.rb +24 -0
  43. data/lib/nfse_sjc/schemas.rb +17 -0
  44. data/lib/nfse_sjc/version.rb +3 -0
  45. data/nfse_sjc.gemspec +32 -0
  46. metadata +175 -0
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"
4
+ targetNamespace="http://www.ginfes.com.br/cabecalho_v03.xsd"
5
+ elementFormDefault="unqualified" attributeFormDefault="unqualified">
6
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
7
+ <xsd:element name="cabecalho">
8
+ <xsd:complexType>
9
+ <xsd:sequence>
10
+ <xsd:element name="versaoDados" type="tipos:tsVersao"
11
+ minOccurs="1" maxOccurs="1" />
12
+ </xsd:sequence>
13
+ <xsd:attribute name="versao" type="tipos:tsVersao" use="required" />
14
+ </xsd:complexType>
15
+ </xsd:element>
16
+ </xsd:schema>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"
4
+ targetNamespace="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd"
5
+ xmlns="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd"
6
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" attributeFormDefault="unqualified"
7
+ elementFormDefault="unqualified">
8
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
9
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#"
10
+ schemaLocation="xmldsig-core-schema20020212_v03.xsd" />
11
+ <xsd:element name="CancelarNfseEnvio">
12
+ <xsd:complexType>
13
+ <xsd:sequence>
14
+ <xsd:element name="Pedido" type="tipos:tcPedidoCancelamento" />
15
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
16
+ </xsd:sequence>
17
+ </xsd:complexType>
18
+ </xsd:element>
19
+ </xsd:schema>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_cancelar_nfse_resposta_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_cancelar_nfse_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:element name="CancelarNfseResposta">
6
+ <xsd:complexType>
7
+ <xsd:choice>
8
+ <xsd:element name="Cancelamento" type="tipos:tcCancelamentoNfse"/>
9
+ <xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
10
+ </xsd:choice>
11
+ </xsd:complexType>
12
+ </xsd:element>
13
+ </xsd:schema>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"
4
+ targetNamespace="http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd"
5
+ xmlns="http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd"
6
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
7
+ attributeFormDefault="unqualified" elementFormDefault="qualified">
8
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/>
9
+ <xsd:import schemaLocation="tipos_v03.xsd"
10
+ namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
11
+ <xsd:element name="ConsultarLoteRpsEnvio">
12
+ <xsd:complexType>
13
+ <xsd:sequence>
14
+ <xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador"
15
+ minOccurs="1" maxOccurs="1" />
16
+ <xsd:element name="Protocolo" type="tipos:tsNumeroProtocolo"
17
+ minOccurs="1" maxOccurs="1" />
18
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
19
+ </xsd:sequence>
20
+ <xsd:attribute name="Id" type="tipos:tsIdTag"/>
21
+ </xsd:complexType>
22
+ </xsd:element>
23
+ </xsd:schema>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> <xsd:element name="ConsultarLoteRpsResposta">
5
+ <xsd:complexType>
6
+ <xsd:choice>
7
+ <xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1">
8
+ <xsd:complexType>
9
+ <xsd:sequence>
10
+ <xsd:element name="CompNfse" maxOccurs="unbounded" type="tipos:tcCompNfse" minOccurs="1"/>
11
+ </xsd:sequence>
12
+ </xsd:complexType>
13
+ </xsd:element>
14
+ <xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
15
+ </xsd:choice>
16
+ </xsd:complexType>
17
+ </xsd:element>
18
+ </xsd:schema>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/>
6
+ <xsd:element name="ConsultarNfseEnvio">
7
+ <xsd:complexType>
8
+ <xsd:sequence>
9
+ <xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
10
+ <xsd:element name="NumeroNfse" type="tipos:tsNumeroNfse" minOccurs="0" maxOccurs="1"/>
11
+ <xsd:element name="PeriodoEmissao" minOccurs="0" maxOccurs="1">
12
+ <xsd:complexType>
13
+ <xsd:sequence>
14
+ <xsd:element name="DataInicial" type="xsd:date" minOccurs="1" maxOccurs="1"/>
15
+ <xsd:element name="DataFinal" type="xsd:date" minOccurs="1" maxOccurs="1"/>
16
+ </xsd:sequence>
17
+ </xsd:complexType>
18
+ </xsd:element>
19
+ <xsd:element name="Tomador" type="tipos:tcIdentificacaoTomador" minOccurs="0" maxOccurs="1"/>
20
+ <xsd:element name="IntermediarioServico" type="tipos:tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1"/>
21
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
22
+ </xsd:sequence>
23
+ <xsd:attribute name="Id" type="tipos:tsIdTag"/>
24
+ </xsd:complexType>
25
+ </xsd:element>
26
+ </xsd:schema>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:element name="ConsultarNfseResposta">
6
+ <xsd:complexType>
7
+ <xsd:choice>
8
+ <xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1">
9
+ <xsd:complexType>
10
+ <xsd:sequence>
11
+ <xsd:element name="CompNfse" maxOccurs="unbounded" type="tipos:tcCompNfse" minOccurs="0"/>
12
+ </xsd:sequence>
13
+ </xsd:complexType>
14
+ </xsd:element>
15
+ <xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
16
+ </xsd:choice>
17
+ </xsd:complexType>
18
+ </xsd:element>
19
+ </xsd:schema>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd"
4
+ xmlns:tipos = "http://www.ginfes.com.br/tipos_v03.xsd"
5
+ xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd"
6
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
7
+ attributeFormDefault="unqualified" elementFormDefault="qualified">
8
+ <xsd:import schemaLocation="tipos_v03.xsd"
9
+ namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
10
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/>
11
+
12
+ <xsd:element name="ConsultarNfseRpsEnvio">
13
+ <xsd:complexType>
14
+ <xsd:sequence>
15
+ <xsd:element name="IdentificacaoRps" type="tipos:tcIdentificacaoRps"
16
+ minOccurs="1" maxOccurs="1" />
17
+ <xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador"
18
+ minOccurs="1" maxOccurs="1" />
19
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
20
+ </xsd:sequence>
21
+ </xsd:complexType>
22
+ </xsd:element>
23
+ </xsd:schema>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_consultar_nfse_rps_resposta_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:element name="ConsultarNfseRpsResposta">
6
+ <xsd:complexType>
7
+ <xsd:choice>
8
+ <xsd:element name="CompNfse" type="tipos:tcCompNfse" minOccurs="1" maxOccurs="1"/>
9
+ <xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
10
+ </xsd:choice>
11
+ </xsd:complexType>
12
+ </xsd:element>
13
+ </xsd:schema>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/>
6
+
7
+ <xsd:element name="ConsultarSituacaoLoteRpsEnvio">
8
+ <xsd:complexType>
9
+ <xsd:sequence>
10
+ <xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
11
+ <xsd:element name="Protocolo" type="tipos:tsNumeroProtocolo" minOccurs="1" maxOccurs="1"/>
12
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
13
+ </xsd:sequence>
14
+ <xsd:attribute name="Id" type="tipos:tsIdTag"/>
15
+ </xsd:complexType>
16
+ </xsd:element>
17
+ </xsd:schema>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:element name="ConsultarSituacaoLoteRpsResposta">
6
+ <xsd:complexType>
7
+ <xsd:choice>
8
+ <xsd:sequence>
9
+ <xsd:element name="NumeroLote" type="tipos:tsNumeroLote" minOccurs="1" maxOccurs="1"/>
10
+ <xsd:element name="Situacao" type="tipos:tsSituacaoLoteRps" minOccurs="1" maxOccurs="1"/>
11
+ </xsd:sequence>
12
+ <xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/>
13
+ </xsd:choice>
14
+ </xsd:complexType>
15
+ </xsd:element>
16
+ </xsd:schema>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd" targetNamespace="http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd"
3
+ xmlns="http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" attributeFormDefault="unqualified" elementFormDefault="qualified">
4
+ <xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
5
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/>
6
+ <xsd:element name="EnviarLoteRpsEnvio">
7
+ <xsd:complexType>
8
+ <xsd:sequence>
9
+ <xsd:element name="LoteRps" type="tipos:tcLoteRps"/>
10
+ <xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/>
11
+ </xsd:sequence>
12
+ </xsd:complexType>
13
+ </xsd:element>
14
+ </xsd:schema>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"
4
+ targetNamespace="http://www.ginfes.com.br/servico_enviar_lote_rps_resposta_v03.xsd"
5
+ xmlns="http://www.ginfes.com.br/servico_enviar_lote_rps_resposta_v03.xsd"
6
+ attributeFormDefault="unqualified" elementFormDefault="qualified">
7
+ <xsd:import schemaLocation="tipos_v03.xsd"
8
+ namespace="http://www.ginfes.com.br/tipos_v03.xsd" />
9
+ <xsd:element name="EnviarLoteRpsResposta">
10
+ <xsd:complexType>
11
+ <xsd:choice>
12
+ <xsd:sequence>
13
+ <xsd:element name="NumeroLote" type="tipos:tsNumeroLote"
14
+ minOccurs="1" maxOccurs="1" />
15
+ <xsd:element name="DataRecebimento" type="xsd:dateTime"
16
+ minOccurs="1" maxOccurs="1" />
17
+ <xsd:element name="Protocolo" type="tipos:tsNumeroProtocolo"
18
+ minOccurs="1" maxOccurs="1" />
19
+ </xsd:sequence>
20
+ <xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1"
21
+ maxOccurs="1" />
22
+ </xsd:choice>
23
+ </xsd:complexType>
24
+ </xsd:element>
25
+ </xsd:schema>
@@ -0,0 +1,545 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.ginfes.com.br/tipos_v03.xsd" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.ginfes.com.br/tipos_v03.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
3
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/>
4
+ <xsd:simpleType name="tsNumeroNfse">
5
+ <xsd:restriction base="xsd:nonNegativeInteger">
6
+ <xsd:totalDigits value="15"/>
7
+ <xsd:whiteSpace value="collapse"/>
8
+ </xsd:restriction>
9
+ </xsd:simpleType>
10
+ <xsd:simpleType name="tsCodigoVerificacao">
11
+ <xsd:restriction base="xsd:string">
12
+ <xsd:maxLength value="9"/>
13
+ <xsd:minLength value="1"/>
14
+ <xsd:whiteSpace value="collapse"/>
15
+ </xsd:restriction>
16
+ </xsd:simpleType>
17
+ <xsd:simpleType name="tsStatusRps">
18
+ <xsd:restriction base="xsd:byte">
19
+ <xsd:pattern value="1|2"/>
20
+ <xsd:whiteSpace value="collapse"/>
21
+ </xsd:restriction>
22
+ </xsd:simpleType>
23
+ <xsd:simpleType name="tsStatusNfse">
24
+ <xsd:restriction base="xsd:byte">
25
+ <xsd:pattern value="1|2"/>
26
+ <xsd:whiteSpace value="collapse"/>
27
+ </xsd:restriction>
28
+ </xsd:simpleType>
29
+ <xsd:simpleType name="tsNaturezaOperacao">
30
+ <xsd:restriction base="xsd:byte">
31
+ <xsd:pattern value="1|2|3|4|5|6"/>
32
+ <xsd:whiteSpace value="collapse"/>
33
+ </xsd:restriction>
34
+ </xsd:simpleType>
35
+ <xsd:simpleType name="tsRegimeEspecialTributacao">
36
+ <xsd:restriction base="xsd:byte">
37
+ <xsd:pattern value="1|2|3|4|5|6"/>
38
+ <xsd:whiteSpace value="collapse"/>
39
+ </xsd:restriction>
40
+ </xsd:simpleType>
41
+ <xsd:simpleType name="tsSimNao">
42
+ <xsd:restriction base="xsd:byte">
43
+ <xsd:pattern value="1|2"/>
44
+ <xsd:whiteSpace value="collapse"/>
45
+ </xsd:restriction>
46
+ </xsd:simpleType>
47
+ <xsd:simpleType name="tsNumeroRps">
48
+ <xsd:restriction base="xsd:nonNegativeInteger">
49
+ <xsd:totalDigits value="15"/>
50
+ <xsd:whiteSpace value="collapse"/>
51
+ </xsd:restriction>
52
+ </xsd:simpleType>
53
+ <xsd:simpleType name="tsSerieRps">
54
+ <xsd:restriction base="xsd:string">
55
+ <xsd:maxLength value="5"/>
56
+ <xsd:minLength value="1"/>
57
+ <xsd:whiteSpace value="collapse"/>
58
+ </xsd:restriction>
59
+ </xsd:simpleType>
60
+ <xsd:simpleType name="tsTipoRps">
61
+ <xsd:restriction base="xsd:byte">
62
+ <xsd:pattern value="1|2|3"/>
63
+ <xsd:whiteSpace value="collapse"/>
64
+ </xsd:restriction>
65
+ </xsd:simpleType>
66
+ <xsd:simpleType name="tsOutrasInformacoes">
67
+ <xsd:restriction base="xsd:string">
68
+ <xsd:maxLength value="255"/>
69
+ <xsd:minLength value="1"/>
70
+ <xsd:whiteSpace value="collapse"/>
71
+ </xsd:restriction>
72
+ </xsd:simpleType>
73
+ <xsd:simpleType name="tsValor">
74
+ <xsd:restriction base="xsd:decimal">
75
+ <xsd:totalDigits value="15"/>
76
+ <xsd:fractionDigits value="2" fixed="true"/>
77
+ <xsd:minInclusive value="0"/>
78
+ <xsd:whiteSpace value="collapse"/>
79
+ </xsd:restriction>
80
+ </xsd:simpleType>
81
+ <xsd:simpleType name="tsItemListaServico">
82
+ <xsd:restriction base="xsd:string">
83
+ <xsd:maxLength value="5"/>
84
+ <xsd:minLength value="1"/>
85
+ <xsd:whiteSpace value="collapse"/>
86
+ </xsd:restriction>
87
+ </xsd:simpleType>
88
+ <xsd:simpleType name="tsCodigoCnae">
89
+ <xsd:restriction base="xsd:int">
90
+ <xsd:totalDigits value="7"/>
91
+ <xsd:whiteSpace value="collapse"/>
92
+ </xsd:restriction>
93
+ </xsd:simpleType>
94
+ <xsd:simpleType name="tsCodigoTributacao">
95
+ <xsd:restriction base="xsd:string">
96
+ <xsd:maxLength value="20"/>
97
+ <xsd:minLength value="1"/>
98
+ <xsd:whiteSpace value="collapse"/>
99
+ </xsd:restriction>
100
+ </xsd:simpleType>
101
+ <xsd:simpleType name="tsAliquota">
102
+ <xsd:restriction base="xsd:decimal">
103
+ <xsd:totalDigits value="5"/>
104
+ <xsd:fractionDigits value="4"/>
105
+ <xsd:minInclusive value="0"/>
106
+ <xsd:whiteSpace value="collapse"/>
107
+ </xsd:restriction>
108
+ </xsd:simpleType>
109
+ <xsd:simpleType name="tsDiscriminacao">
110
+ <xsd:restriction base="xsd:string">
111
+ <xsd:maxLength value="2000"/>
112
+ <xsd:minLength value="1"/>
113
+ <xsd:whiteSpace value="collapse"/>
114
+ </xsd:restriction>
115
+ </xsd:simpleType>
116
+ <xsd:simpleType name="tsCodigoMunicipioIbge">
117
+ <xsd:restriction base="xsd:int">
118
+ <xsd:totalDigits value="7"/>
119
+ <xsd:whiteSpace value="collapse"/>
120
+ </xsd:restriction>
121
+ </xsd:simpleType>
122
+ <xsd:simpleType name="tsInscricaoMunicipal">
123
+ <xsd:restriction base="xsd:string">
124
+ <xsd:maxLength value="15"/>
125
+ <xsd:minLength value="1"/>
126
+ <xsd:whiteSpace value="collapse"/>
127
+ </xsd:restriction>
128
+ </xsd:simpleType>
129
+ <xsd:simpleType name="tsRazaoSocial">
130
+ <xsd:restriction base="xsd:string">
131
+ <xsd:maxLength value="115"/>
132
+ <xsd:minLength value="1"/>
133
+ <xsd:whiteSpace value="collapse"/>
134
+ </xsd:restriction>
135
+ </xsd:simpleType>
136
+ <xsd:simpleType name="tsNomeFantasia">
137
+ <xsd:restriction base="xsd:string">
138
+ <xsd:maxLength value="60"/>
139
+ <xsd:minLength value="1"/>
140
+ <xsd:whiteSpace value="collapse"/>
141
+ </xsd:restriction>
142
+ </xsd:simpleType>
143
+ <xsd:simpleType name="tsCnpj">
144
+ <xsd:restriction base="xsd:string">
145
+ <xsd:length value="14" fixed="true"/>
146
+ <xsd:whiteSpace value="collapse"/>
147
+ </xsd:restriction>
148
+ </xsd:simpleType>
149
+ <xsd:simpleType name="tsEndereco">
150
+ <xsd:restriction base="xsd:string">
151
+ <xsd:maxLength value="125"/>
152
+ <xsd:minLength value="1"/>
153
+ <xsd:whiteSpace value="collapse"/>
154
+ </xsd:restriction>
155
+ </xsd:simpleType>
156
+ <xsd:simpleType name="tsNumeroEndereco">
157
+ <xsd:restriction base="xsd:string">
158
+ <xsd:maxLength value="10"/>
159
+ <xsd:minLength value="1"/>
160
+ <xsd:whiteSpace value="collapse"/>
161
+ </xsd:restriction>
162
+ </xsd:simpleType>
163
+ <xsd:simpleType name="tsComplementoEndereco">
164
+ <xsd:restriction base="xsd:string">
165
+ <xsd:maxLength value="60"/>
166
+ <xsd:minLength value="1"/>
167
+ <xsd:whiteSpace value="collapse"/>
168
+ </xsd:restriction>
169
+ </xsd:simpleType>
170
+ <xsd:simpleType name="tsBairro">
171
+ <xsd:restriction base="xsd:string">
172
+ <xsd:maxLength value="60"/>
173
+ <xsd:minLength value="1"/>
174
+ <xsd:whiteSpace value="collapse"/>
175
+ </xsd:restriction>
176
+ </xsd:simpleType>
177
+ <xsd:simpleType name="tsUf">
178
+ <xsd:restriction base="xsd:string">
179
+ <xsd:length value="2" fixed="true"/>
180
+ <xsd:whiteSpace value="collapse"/>
181
+ </xsd:restriction>
182
+ </xsd:simpleType>
183
+ <xsd:simpleType name="tsCep">
184
+ <xsd:restriction base="xsd:int">
185
+ <xsd:totalDigits value="8" fixed="true"/>
186
+ <xsd:whiteSpace value="collapse"/>
187
+ </xsd:restriction>
188
+ </xsd:simpleType>
189
+ <xsd:simpleType name="tsEmail">
190
+ <xsd:restriction base="xsd:string">
191
+ <xsd:maxLength value="80"/>
192
+ <xsd:minLength value="1"/>
193
+ <xsd:whiteSpace value="collapse"/>
194
+ </xsd:restriction>
195
+ </xsd:simpleType>
196
+ <xsd:simpleType name="tsTelefone">
197
+ <xsd:restriction base="xsd:string">
198
+ <xsd:maxLength value="11"/>
199
+ <xsd:minLength value="1"/>
200
+ <xsd:whiteSpace value="collapse"/>
201
+ </xsd:restriction>
202
+ </xsd:simpleType>
203
+ <xsd:simpleType name="tsCpf">
204
+ <xsd:restriction base="xsd:string">
205
+ <xsd:length value="11" fixed="true"/>
206
+ <xsd:whiteSpace value="collapse"/>
207
+ </xsd:restriction>
208
+ </xsd:simpleType>
209
+ <xsd:simpleType name="tsIndicacaoCpfCnpj">
210
+ <xsd:restriction base="xsd:byte">
211
+ <xsd:pattern value="1|2|3"/>
212
+ <xsd:whiteSpace value="collapse"/>
213
+ </xsd:restriction>
214
+ </xsd:simpleType>
215
+ <xsd:simpleType name="tsCodigoObra">
216
+ <xsd:restriction base="xsd:string">
217
+ <xsd:maxLength value="15"/>
218
+ <xsd:minLength value="1"/>
219
+ <xsd:whiteSpace value="collapse"/>
220
+ </xsd:restriction>
221
+ </xsd:simpleType>
222
+ <xsd:simpleType name="tsArt">
223
+ <xsd:restriction base="xsd:string">
224
+ <xsd:maxLength value="15"/>
225
+ <xsd:minLength value="1"/>
226
+ <xsd:whiteSpace value="collapse"/>
227
+ </xsd:restriction>
228
+ </xsd:simpleType>
229
+ <xsd:simpleType name="tsNumeroLote">
230
+ <xsd:restriction base="xsd:nonNegativeInteger">
231
+ <xsd:totalDigits value="15"/>
232
+ <xsd:whiteSpace value="collapse"/>
233
+ </xsd:restriction>
234
+ </xsd:simpleType>
235
+ <xsd:simpleType name="tsNumeroProtocolo">
236
+ <xsd:restriction base="xsd:string">
237
+ <xsd:maxLength value="50"/>
238
+ <xsd:whiteSpace value="collapse"/>
239
+ </xsd:restriction>
240
+ </xsd:simpleType>
241
+ <xsd:simpleType name="tsSituacaoLoteRps">
242
+ <xsd:restriction base="xsd:byte">
243
+ <xsd:pattern value="1|2|3|4"/>
244
+ <xsd:whiteSpace value="collapse"/>
245
+ </xsd:restriction>
246
+ </xsd:simpleType>
247
+ <xsd:simpleType name="tsQuantidadeRps">
248
+ <xsd:restriction base="xsd:int">
249
+ <xsd:totalDigits value="4"/>
250
+ <xsd:whiteSpace value="collapse"/>
251
+ </xsd:restriction>
252
+ </xsd:simpleType>
253
+ <xsd:simpleType name="tsCodigoMensagemAlerta">
254
+ <xsd:restriction base="xsd:string">
255
+ <xsd:maxLength value="4"/>
256
+ <xsd:minLength value="1"/>
257
+ <xsd:whiteSpace value="collapse"/>
258
+ </xsd:restriction>
259
+ </xsd:simpleType>
260
+ <xsd:simpleType name="tsDescricaoMensagemAlerta">
261
+ <xsd:restriction base="xsd:string">
262
+ <xsd:maxLength value="200"/>
263
+ <xsd:minLength value="1"/>
264
+ <xsd:whiteSpace value="collapse"/>
265
+ </xsd:restriction>
266
+ </xsd:simpleType>
267
+ <xsd:simpleType name="tsCodigoCancelamentoNfse">
268
+ <xsd:restriction base="xsd:string">
269
+ <xsd:maxLength value="4"/>
270
+ <xsd:minLength value="1"/>
271
+ <xsd:whiteSpace value="collapse"/>
272
+ </xsd:restriction>
273
+ </xsd:simpleType>
274
+ <xsd:simpleType name="tsIdTag">
275
+ <xsd:restriction base="xsd:string">
276
+ <xsd:maxLength value="255"/>
277
+ <xsd:whiteSpace value="collapse"/>
278
+ </xsd:restriction>
279
+ </xsd:simpleType>
280
+ <xsd:simpleType name="tsVersao">
281
+ <xsd:restriction base="xsd:token">
282
+ <xsd:pattern value="[0-9]{1,4}"/>
283
+ <xsd:whiteSpace value="collapse"/>
284
+ </xsd:restriction>
285
+ </xsd:simpleType>
286
+ <!-- tipos complexo -->
287
+ <xsd:complexType name="tcCpfCnpj">
288
+ <xsd:choice>
289
+ <xsd:element name="Cpf" type="tsCpf"/>
290
+ <xsd:element name="Cnpj" type="tsCnpj"/>
291
+ </xsd:choice>
292
+ </xsd:complexType>
293
+ <xsd:complexType name="tcEndereco">
294
+ <xsd:sequence>
295
+ <xsd:element name="Endereco" type="tsEndereco" minOccurs="0"/>
296
+ <xsd:element name="Numero" type="tsNumeroEndereco" minOccurs="0"/>
297
+ <xsd:element name="Complemento" type="tsComplementoEndereco" minOccurs="0"/>
298
+ <xsd:element name="Bairro" type="tsBairro" minOccurs="0"/>
299
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0"/>
300
+ <xsd:element name="Uf" type="tsUf" minOccurs="0"/>
301
+ <xsd:element name="Cep" type="tsCep" minOccurs="0"/>
302
+ </xsd:sequence>
303
+ </xsd:complexType>
304
+ <xsd:complexType name="tcContato">
305
+ <xsd:sequence>
306
+ <xsd:element name="Telefone" type="tsTelefone" minOccurs="0"/>
307
+ <xsd:element name="Email" type="tsEmail" minOccurs="0"/>
308
+ </xsd:sequence>
309
+ </xsd:complexType>
310
+ <xsd:complexType name="tcIdentificacaoOrgaoGerador">
311
+ <xsd:sequence>
312
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/>
313
+ <xsd:element name="Uf" type="tsUf"/>
314
+ </xsd:sequence>
315
+ </xsd:complexType>
316
+ <xsd:complexType name="tcIdentificacaoRps">
317
+ <xsd:sequence>
318
+ <xsd:element name="Numero" type="tsNumeroRps"/>
319
+ <xsd:element name="Serie" type="tsSerieRps"/>
320
+ <xsd:element name="Tipo" type="tsTipoRps"/>
321
+ </xsd:sequence>
322
+ </xsd:complexType>
323
+ <xsd:complexType name="tcIdentificacaoPrestador">
324
+ <xsd:sequence>
325
+ <xsd:element name="Cnpj" type="tsCnpj"/>
326
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
327
+ </xsd:sequence>
328
+ </xsd:complexType>
329
+ <xsd:complexType name="tcIdentificacaoTomador">
330
+ <xsd:sequence>
331
+ <xsd:element name="CpfCnpj" type="tcCpfCnpj" minOccurs="0"/>
332
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
333
+ </xsd:sequence>
334
+ </xsd:complexType>
335
+ <xsd:complexType name="tcDadosTomador">
336
+ <xsd:sequence>
337
+ <xsd:element name="IdentificacaoTomador" type="tcIdentificacaoTomador" minOccurs="0"/>
338
+ <xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="0"/>
339
+ <xsd:element name="Endereco" type="tcEndereco" minOccurs="0"/>
340
+ <xsd:element name="Contato" type="tcContato" minOccurs="0"/>
341
+ </xsd:sequence>
342
+ </xsd:complexType>
343
+ <xsd:complexType name="tcIdentificacaoIntermediarioServico">
344
+ <xsd:sequence>
345
+ <xsd:element name="RazaoSocial" type="tsRazaoSocial"/>
346
+ <xsd:element name="CpfCnpj" type="tcCpfCnpj"/>
347
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
348
+ </xsd:sequence>
349
+ </xsd:complexType>
350
+ <xsd:complexType name="tcValores">
351
+ <xsd:sequence>
352
+ <xsd:element name="ValorServicos" type="tsValor"/>
353
+ <xsd:element name="ValorDeducoes" type="tsValor" minOccurs="0"/>
354
+ <xsd:element name="ValorPis" type="tsValor" minOccurs="0"/>
355
+ <xsd:element name="ValorCofins" type="tsValor" minOccurs="0"/>
356
+ <xsd:element name="ValorInss" type="tsValor" minOccurs="0"/>
357
+ <xsd:element name="ValorIr" type="tsValor" minOccurs="0"/>
358
+ <xsd:element name="ValorCsll" type="tsValor" minOccurs="0"/>
359
+ <xsd:element name="IssRetido" type="tsSimNao"/>
360
+ <xsd:element name="ValorIss" type="tsValor" minOccurs="0"/>
361
+ <xsd:element name="ValorIssRetido" type="tsValor" minOccurs="0"/>
362
+ <xsd:element name="OutrasRetencoes" type="tsValor" minOccurs="0"/>
363
+ <xsd:element name="BaseCalculo" type="tsValor" minOccurs="0"/>
364
+ <xsd:element name="Aliquota" type="tsAliquota" minOccurs="0"/>
365
+ <xsd:element name="ValorLiquidoNfse" type="tsValor" minOccurs="0"/>
366
+ <xsd:element name="DescontoIncondicionado" type="tsValor" minOccurs="0"/>
367
+ <xsd:element name="DescontoCondicionado" type="tsValor" minOccurs="0"/>
368
+ </xsd:sequence>
369
+ </xsd:complexType>
370
+ <xsd:complexType name="tcDadosServico">
371
+ <xsd:sequence>
372
+ <xsd:element name="Valores" type="tcValores"/>
373
+ <xsd:element name="ItemListaServico" type="tsItemListaServico"/>
374
+ <xsd:element name="CodigoCnae" type="tsCodigoCnae" minOccurs="0"/>
375
+ <xsd:element name="CodigoTributacaoMunicipio" type="tsCodigoTributacao" minOccurs="0"/>
376
+ <xsd:element name="Discriminacao" type="tsDiscriminacao"/>
377
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/>
378
+ </xsd:sequence>
379
+ </xsd:complexType>
380
+ <xsd:complexType name="tcDadosConstrucaoCivil">
381
+ <xsd:sequence>
382
+ <xsd:element name="CodigoObra" type="tsCodigoObra"/>
383
+ <xsd:element name="Art" type="tsArt"/>
384
+ </xsd:sequence>
385
+ </xsd:complexType>
386
+ <xsd:complexType name="tcDadosPrestador">
387
+ <xsd:sequence>
388
+ <xsd:element name="IdentificacaoPrestador" type="tcIdentificacaoPrestador"/>
389
+ <xsd:element name="RazaoSocial" type="tsRazaoSocial"/>
390
+ <xsd:element name="NomeFantasia" type="tsNomeFantasia" minOccurs="0"/>
391
+ <xsd:element name="Endereco" type="tcEndereco"/>
392
+ <xsd:element name="Contato" type="tcContato" minOccurs="0"/>
393
+ </xsd:sequence>
394
+ </xsd:complexType>
395
+ <xsd:complexType name="tcInfRps">
396
+ <xsd:sequence>
397
+ <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/>
398
+ <xsd:element name="DataEmissao" type="xsd:dateTime"/>
399
+ <xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao"/>
400
+ <xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0"/>
401
+ <xsd:element name="OptanteSimplesNacional" type="tsSimNao"/>
402
+ <xsd:element name="IncentivadorCultural" type="tsSimNao"/>
403
+ <xsd:element name="Status" type="tsStatusRps"/>
404
+ <xsd:element name="RpsSubstituido" type="tcIdentificacaoRps" minOccurs="0"/>
405
+ <xsd:element name="Servico" type="tcDadosServico"/>
406
+ <xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
407
+ <xsd:element name="Tomador" type="tcDadosTomador"/>
408
+ <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/>
409
+ <xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0"/>
410
+ </xsd:sequence>
411
+ <xsd:attribute name="Id" type="tsIdTag"/>
412
+ </xsd:complexType>
413
+ <xsd:complexType name="tcRps">
414
+ <xsd:sequence>
415
+ <xsd:element name="InfRps" type="tcInfRps"/>
416
+ <xsd:element ref="dsig:Signature" minOccurs="0"/>
417
+ </xsd:sequence>
418
+ </xsd:complexType>
419
+ <xsd:complexType name="tcIdentificacaoNfse">
420
+ <xsd:sequence>
421
+ <xsd:element name="Numero" type="tsNumeroNfse"/>
422
+ <xsd:element name="Cnpj" type="tsCnpj"/>
423
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
424
+ <xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/>
425
+ </xsd:sequence>
426
+ </xsd:complexType>
427
+ <xsd:complexType name="tcInfNfse">
428
+ <xsd:sequence>
429
+ <xsd:element name="Numero" type="tsNumeroNfse"/>
430
+ <xsd:element name="CodigoVerificacao" type="tsCodigoVerificacao"/>
431
+ <xsd:element name="DataEmissao" type="xsd:dateTime"/>
432
+ <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="0"/>
433
+ <xsd:element name="DataEmissaoRps" type="xsd:date" minOccurs="0"/>
434
+ <xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao"/>
435
+ <xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0"/>
436
+ <xsd:element name="OptanteSimplesNacional" type="tsSimNao"/>
437
+ <xsd:element name="IncentivadorCultural" type="tsSimNao"/>
438
+ <xsd:element name="Competencia" type="xsd:date"/>
439
+ <xsd:element name="NfseSubstituida" type="tsNumeroNfse" minOccurs="0"/>
440
+ <xsd:element name="OutrasInformacoes" type="tsOutrasInformacoes" minOccurs="0"/>
441
+ <xsd:element name="Servico" type="tcDadosServico"/>
442
+ <xsd:element name="ValorCredito" type="tsValor" minOccurs="0"/>
443
+ <xsd:element name="PrestadorServico" type="tcDadosPrestador"/>
444
+ <xsd:element name="TomadorServico" type="tcDadosTomador"/>
445
+ <xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/>
446
+ <xsd:element name="OrgaoGerador" type="tcIdentificacaoOrgaoGerador"/>
447
+ <xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0"/>
448
+ </xsd:sequence>
449
+ <xsd:attribute name="Id" type="tsIdTag"/>
450
+ </xsd:complexType>
451
+ <xsd:complexType name="tcNfse">
452
+ <xsd:sequence>
453
+ <xsd:element name="InfNfse" type="tcInfNfse"/>
454
+ <xsd:element ref="dsig:Signature" maxOccurs="2"/>
455
+ </xsd:sequence>
456
+ </xsd:complexType>
457
+ <xsd:complexType name="tcInfPedidoCancelamento">
458
+ <xsd:sequence>
459
+ <xsd:element name="IdentificacaoNfse" type="tcIdentificacaoNfse"/>
460
+ <xsd:element name="CodigoCancelamento" type="tsCodigoCancelamentoNfse"/>
461
+ </xsd:sequence>
462
+ <xsd:attribute name="Id" type="tsIdTag"/>
463
+ </xsd:complexType>
464
+ <xsd:complexType name="tcPedidoCancelamento">
465
+ <xsd:sequence>
466
+ <xsd:element name="InfPedidoCancelamento" type="tcInfPedidoCancelamento"/>
467
+ <xsd:element ref="dsig:Signature" minOccurs="0"/>
468
+ </xsd:sequence>
469
+ </xsd:complexType>
470
+ <xsd:complexType name="tcInfConfirmacaoCancelamento">
471
+ <xsd:sequence>
472
+ <xsd:element name="Sucesso" type="xsd:boolean"/>
473
+ <xsd:element name="DataHora" type="xsd:dateTime"/>
474
+ </xsd:sequence>
475
+ </xsd:complexType>
476
+ <xsd:complexType name="tcConfirmacaoCancelamento">
477
+ <xsd:sequence>
478
+ <xsd:element name="Pedido" type="tcPedidoCancelamento"/>
479
+ <xsd:element name="InfConfirmacaoCancelamento" type="tcInfConfirmacaoCancelamento"/>
480
+ </xsd:sequence>
481
+ <xsd:attribute name="Id" type="tsIdTag"/>
482
+ </xsd:complexType>
483
+ <xsd:complexType name="tcCancelamentoNfse">
484
+ <xsd:sequence>
485
+ <xsd:element name="Confirmacao" type="tcConfirmacaoCancelamento"/>
486
+ <xsd:element ref="dsig:Signature" minOccurs="0"/>
487
+ </xsd:sequence>
488
+ </xsd:complexType>
489
+ <xsd:complexType name="tcInfSubstituicaoNfse">
490
+ <xsd:sequence>
491
+ <xsd:element name="NfseSubstituidora" type="tsNumeroNfse"/>
492
+ </xsd:sequence>
493
+ <xsd:attribute name="Id" type="tsIdTag"/>
494
+ </xsd:complexType>
495
+ <xsd:complexType name="tcSubstituicaoNfse">
496
+ <xsd:sequence>
497
+ <xsd:element name="SubstituicaoNfse" type="tcInfSubstituicaoNfse"/>
498
+ <xsd:element ref="dsig:Signature" maxOccurs="2"/>
499
+ </xsd:sequence>
500
+ </xsd:complexType>
501
+ <xsd:complexType name="tcCompNfse">
502
+ <xsd:sequence>
503
+ <xsd:element name="Nfse" type="tcNfse"/>
504
+ <xsd:element name="NfseCancelamento" type="tcCancelamentoNfse" minOccurs="0"/>
505
+ <xsd:element name="NfseSubstituicao" type="tcSubstituicaoNfse" minOccurs="0"/>
506
+ </xsd:sequence>
507
+ </xsd:complexType>
508
+ <xsd:element name="ListaMensagemRetorno">
509
+ <xsd:complexType>
510
+ <xsd:sequence>
511
+ <xsd:element name="MensagemRetorno" type="tcMensagemRetorno" maxOccurs="unbounded"/>
512
+ </xsd:sequence>
513
+ </xsd:complexType>
514
+ </xsd:element>
515
+ <xsd:complexType name="tcMensagemRetorno">
516
+ <xsd:sequence>
517
+ <xsd:element name="Codigo" type="tsCodigoMensagemAlerta"/>
518
+ <xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta"/>
519
+ <xsd:element name="Correcao" type="tsDescricaoMensagemAlerta" minOccurs="0"/>
520
+ </xsd:sequence>
521
+ </xsd:complexType>
522
+ <xsd:complexType name="tcMensagemRetornoLote">
523
+ <xsd:sequence>
524
+ <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/>
525
+ <xsd:element name="Codigo" type="tsCodigoMensagemAlerta"/>
526
+ <xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta"/>
527
+ </xsd:sequence>
528
+ </xsd:complexType>
529
+ <xsd:complexType name="tcLoteRps">
530
+ <xsd:sequence>
531
+ <xsd:element name="NumeroLote" type="tsNumeroLote"/>
532
+ <xsd:element name="Cnpj" type="tsCnpj"/>
533
+ <xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal"/>
534
+ <xsd:element name="QuantidadeRps" type="tsQuantidadeRps"/>
535
+ <xsd:element name="ListaRps">
536
+ <xsd:complexType>
537
+ <xsd:sequence>
538
+ <xsd:element name="Rps" type="tcRps" maxOccurs="unbounded"/>
539
+ </xsd:sequence>
540
+ </xsd:complexType>
541
+ </xsd:element>
542
+ </xsd:sequence>
543
+ <xsd:attribute name="Id" type="tsIdTag"/>
544
+ </xsd:complexType>
545
+ </xsd:schema>