41 changed files with 21455 additions and 11716 deletions
-
0pynfe/data/XSDs/NFS-e/Betha/nfse_v202.xsd
-
0pynfe/data/XSDs/NFS-e/Betha/xmldsig-core-schema20020212.xsd
-
16pynfe/data/XSDs/NFS-e/Ginfes/cabecalho_v03.xsd
-
19pynfe/data/XSDs/NFS-e/Ginfes/servico_cancelar_nfse_envio_v03.xsd
-
13pynfe/data/XSDs/NFS-e/Ginfes/servico_cancelar_nfse_resposta_v03.xsd
-
22pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_lote_rps_envio_v03.xsd
-
18pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_lote_rps_resposta_v03.xsd
-
25pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_nfse_envio_v03.xsd
-
19pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_nfse_resposta_v03.xsd
-
23pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_nfse_rps_envio_v03.xsd
-
13pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_nfse_rps_resposta_v03.xsd
-
16pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd
-
16pynfe/data/XSDs/NFS-e/Ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd
-
14pynfe/data/XSDs/NFS-e/Ginfes/servico_enviar_lote_rps_envio_v03.xsd
-
25pynfe/data/XSDs/NFS-e/Ginfes/servico_enviar_lote_rps_resposta_v03.xsd
-
545pynfe/data/XSDs/NFS-e/Ginfes/tipos_v03.xsd
-
316pynfe/data/XSDs/NFS-e/Ginfes/xmldsig-core-schema20020212_v03.xsd
-
273pynfe/processamento/autorizador_nfse.py
-
298pynfe/processamento/serializacao.py
-
0pynfe/utils/nfse/__init__.py
-
0pynfe/utils/nfse/betha/__init__.py
-
0pynfe/utils/nfse/betha/_dsig.py
-
0pynfe/utils/nfse/betha/nfse_v202.py
-
0pynfe/utils/nfse/ginfes/__init__.py
-
2211pynfe/utils/nfse/ginfes/_dsig.py
-
4426pynfe/utils/nfse/ginfes/_tipos.py
-
153pynfe/utils/nfse/ginfes/servico_cancelar_nfse_envio_v03.py
-
145pynfe/utils/nfse/ginfes/servico_cancelar_nfse_resposta_v03.py
-
171pynfe/utils/nfse/ginfes/servico_consultar_lote_rps_envio_v03.py
-
196pynfe/utils/nfse/ginfes/servico_consultar_lote_rps_resposta_v03.py
-
332pynfe/utils/nfse/ginfes/servico_consultar_nfse_envio_v03.py
-
199pynfe/utils/nfse/ginfes/servico_consultar_nfse_resposta_v03.py
-
171pynfe/utils/nfse/ginfes/servico_consultar_nfse_rps_envio_v03.py
-
145pynfe/utils/nfse/ginfes/servico_consultar_nfse_rps_resposta_v03.py
-
171pynfe/utils/nfse/ginfes/servico_consultar_situacao_lote_rps_envio_v03.py
-
163pynfe/utils/nfse/ginfes/servico_consultar_situacao_lote_rps_resposta_v03.py
-
153pynfe/utils/nfse/ginfes/servico_enviar_lote_rps_envio_v03.py
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<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/cabecalho_v03.xsd" |
|||
elementFormDefault="unqualified" attributeFormDefault="unqualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="cabecalho"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="versaoDados" type="tipos:tsVersao" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="versao" type="tipos:tsVersao" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,19 @@ |
|||
<?xml version="1.0"?> |
|||
<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_envio_v03.xsd" |
|||
xmlns="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd" |
|||
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" attributeFormDefault="unqualified" |
|||
elementFormDefault="unqualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" |
|||
schemaLocation="xmldsig-core-schema20020212_v03.xsd" /> |
|||
<xsd:element name="CancelarNfseEnvio"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="Pedido" type="tipos:tcPedidoCancelamento" /> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
xmlns="http://www.ginfes.com.br/servico_cancelar_nfse_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="CancelarNfseResposta"> |
|||
<xsd:complexType> |
|||
<xsd:choice> |
|||
<xsd:element name="Cancelamento" type="tipos:tcCancelamentoNfse"/> |
|||
<xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0"?> |
|||
<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_envio_v03.xsd" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd" |
|||
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" |
|||
attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" |
|||
namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="ConsultarLoteRpsEnvio"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
<xsd:element name="Protocolo" type="tipos:tsNumeroProtocolo" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,18 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> <xsd:element name="ConsultarLoteRpsResposta"> |
|||
<xsd:complexType> |
|||
<xsd:choice> |
|||
<xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="CompNfse" maxOccurs="unbounded" type="tipos:tcCompNfse" minOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/> |
|||
<xsd:element name="ConsultarNfseEnvio"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/> |
|||
<xsd:element name="NumeroNfse" type="tipos:tsNumeroNfse" minOccurs="0" maxOccurs="1"/> |
|||
<xsd:element name="PeriodoEmissao" minOccurs="0" maxOccurs="1"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="DataInicial" type="xsd:date" minOccurs="1" maxOccurs="1"/> |
|||
<xsd:element name="DataFinal" type="xsd:date" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="Tomador" type="tipos:tcIdentificacaoTomador" minOccurs="0" maxOccurs="1"/> |
|||
<xsd:element name="IntermediarioServico" type="tipos:tcIdentificacaoIntermediarioServico" minOccurs="0" maxOccurs="1"/> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,19 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="ConsultarNfseResposta"> |
|||
<xsd:complexType> |
|||
<xsd:choice> |
|||
<xsd:element name="ListaNfse" minOccurs="1" maxOccurs="1"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="CompNfse" maxOccurs="unbounded" type="tipos:tcCompNfse" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0"?> |
|||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
targetNamespace="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd" |
|||
xmlns:tipos = "http://www.ginfes.com.br/tipos_v03.xsd" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd" |
|||
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" |
|||
attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" |
|||
namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/> |
|||
|
|||
<xsd:element name="ConsultarNfseRpsEnvio"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="IdentificacaoRps" type="tipos:tcIdentificacaoRps" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
<xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="ConsultarNfseRpsResposta"> |
|||
<xsd:complexType> |
|||
<xsd:choice> |
|||
<xsd:element name="CompNfse" type="tipos:tcCompNfse" minOccurs="1" maxOccurs="1"/> |
|||
<xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
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"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/> |
|||
|
|||
<xsd:element name="ConsultarSituacaoLoteRpsEnvio"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="Prestador" type="tipos:tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/> |
|||
<xsd:element name="Protocolo" type="tipos:tsNumeroProtocolo" minOccurs="1" maxOccurs="1"/> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="ConsultarSituacaoLoteRpsResposta"> |
|||
<xsd:complexType> |
|||
<xsd:choice> |
|||
<xsd:sequence> |
|||
<xsd:element name="NumeroLote" type="tipos:tsNumeroLote" minOccurs="1" maxOccurs="1"/> |
|||
<xsd:element name="Situacao" type="tipos:tsSituacaoLoteRps" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
<xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" maxOccurs="1"/> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0"?> |
|||
<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" |
|||
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"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/> |
|||
<xsd:element name="EnviarLoteRpsEnvio"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="LoteRps" type="tipos:tcLoteRps"/> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0" maxOccurs="1"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0"?> |
|||
<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_resposta_v03.xsd" |
|||
xmlns="http://www.ginfes.com.br/servico_enviar_lote_rps_resposta_v03.xsd" |
|||
attributeFormDefault="unqualified" elementFormDefault="qualified"> |
|||
<xsd:import schemaLocation="tipos_v03.xsd" |
|||
namespace="http://www.ginfes.com.br/tipos_v03.xsd" /> |
|||
<xsd:element name="EnviarLoteRpsResposta"> |
|||
<xsd:complexType> |
|||
<xsd:choice> |
|||
<xsd:sequence> |
|||
<xsd:element name="NumeroLote" type="tipos:tsNumeroLote" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
<xsd:element name="DataRecebimento" type="xsd:dateTime" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
<xsd:element name="Protocolo" type="tipos:tsNumeroProtocolo" |
|||
minOccurs="1" maxOccurs="1" /> |
|||
</xsd:sequence> |
|||
<xsd:element ref="tipos:ListaMensagemRetorno" minOccurs="1" |
|||
maxOccurs="1" /> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
@ -0,0 +1,545 @@ |
|||
<?xml version="1.0"?> |
|||
<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"> |
|||
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema20020212_v03.xsd"/> |
|||
<xsd:simpleType name="tsNumeroNfse"> |
|||
<xsd:restriction base="xsd:nonNegativeInteger"> |
|||
<xsd:totalDigits value="15"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoVerificacao"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="9"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsStatusRps"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsStatusNfse"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsNaturezaOperacao"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2|3|4|5|6"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsRegimeEspecialTributacao"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2|3|4|5|6"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsSimNao"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsNumeroRps"> |
|||
<xsd:restriction base="xsd:nonNegativeInteger"> |
|||
<xsd:totalDigits value="15"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsSerieRps"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="5"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsTipoRps"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2|3"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsOutrasInformacoes"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="255"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsValor"> |
|||
<xsd:restriction base="xsd:decimal"> |
|||
<xsd:totalDigits value="15"/> |
|||
<xsd:fractionDigits value="2" fixed="true"/> |
|||
<xsd:minInclusive value="0"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsItemListaServico"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="5"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoCnae"> |
|||
<xsd:restriction base="xsd:int"> |
|||
<xsd:totalDigits value="7"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoTributacao"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="20"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsAliquota"> |
|||
<xsd:restriction base="xsd:decimal"> |
|||
<xsd:totalDigits value="5"/> |
|||
<xsd:fractionDigits value="4"/> |
|||
<xsd:minInclusive value="0"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsDiscriminacao"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="2000"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoMunicipioIbge"> |
|||
<xsd:restriction base="xsd:int"> |
|||
<xsd:totalDigits value="7"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsInscricaoMunicipal"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="15"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsRazaoSocial"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="115"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsNomeFantasia"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="60"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCnpj"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:length value="14" fixed="true"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsEndereco"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="125"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsNumeroEndereco"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="10"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsComplementoEndereco"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="60"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsBairro"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="60"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsUf"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:length value="2" fixed="true"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCep"> |
|||
<xsd:restriction base="xsd:int"> |
|||
<xsd:totalDigits value="8" fixed="true"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsEmail"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="80"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsTelefone"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="11"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCpf"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:length value="11" fixed="true"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsIndicacaoCpfCnpj"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2|3"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoObra"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="15"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsArt"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="15"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsNumeroLote"> |
|||
<xsd:restriction base="xsd:nonNegativeInteger"> |
|||
<xsd:totalDigits value="15"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsNumeroProtocolo"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="50"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsSituacaoLoteRps"> |
|||
<xsd:restriction base="xsd:byte"> |
|||
<xsd:pattern value="1|2|3|4"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsQuantidadeRps"> |
|||
<xsd:restriction base="xsd:int"> |
|||
<xsd:totalDigits value="4"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoMensagemAlerta"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="4"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsDescricaoMensagemAlerta"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="200"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsCodigoCancelamentoNfse"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="4"/> |
|||
<xsd:minLength value="1"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsIdTag"> |
|||
<xsd:restriction base="xsd:string"> |
|||
<xsd:maxLength value="255"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<xsd:simpleType name="tsVersao"> |
|||
<xsd:restriction base="xsd:token"> |
|||
<xsd:pattern value="[0-9]{1,4}"/> |
|||
<xsd:whiteSpace value="collapse"/> |
|||
</xsd:restriction> |
|||
</xsd:simpleType> |
|||
<!-- tipos complexo --> |
|||
<xsd:complexType name="tcCpfCnpj"> |
|||
<xsd:choice> |
|||
<xsd:element name="Cpf" type="tsCpf"/> |
|||
<xsd:element name="Cnpj" type="tsCnpj"/> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcEndereco"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Endereco" type="tsEndereco" minOccurs="0"/> |
|||
<xsd:element name="Numero" type="tsNumeroEndereco" minOccurs="0"/> |
|||
<xsd:element name="Complemento" type="tsComplementoEndereco" minOccurs="0"/> |
|||
<xsd:element name="Bairro" type="tsBairro" minOccurs="0"/> |
|||
<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0"/> |
|||
<xsd:element name="Uf" type="tsUf" minOccurs="0"/> |
|||
<xsd:element name="Cep" type="tsCep" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcContato"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Telefone" type="tsTelefone" minOccurs="0"/> |
|||
<xsd:element name="Email" type="tsEmail" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcIdentificacaoOrgaoGerador"> |
|||
<xsd:sequence> |
|||
<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/> |
|||
<xsd:element name="Uf" type="tsUf"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcIdentificacaoRps"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Numero" type="tsNumeroRps"/> |
|||
<xsd:element name="Serie" type="tsSerieRps"/> |
|||
<xsd:element name="Tipo" type="tsTipoRps"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcIdentificacaoPrestador"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Cnpj" type="tsCnpj"/> |
|||
<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcIdentificacaoTomador"> |
|||
<xsd:sequence> |
|||
<xsd:element name="CpfCnpj" type="tcCpfCnpj" minOccurs="0"/> |
|||
<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcDadosTomador"> |
|||
<xsd:sequence> |
|||
<xsd:element name="IdentificacaoTomador" type="tcIdentificacaoTomador" minOccurs="0"/> |
|||
<xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="0"/> |
|||
<xsd:element name="Endereco" type="tcEndereco" minOccurs="0"/> |
|||
<xsd:element name="Contato" type="tcContato" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcIdentificacaoIntermediarioServico"> |
|||
<xsd:sequence> |
|||
<xsd:element name="RazaoSocial" type="tsRazaoSocial"/> |
|||
<xsd:element name="CpfCnpj" type="tcCpfCnpj"/> |
|||
<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcValores"> |
|||
<xsd:sequence> |
|||
<xsd:element name="ValorServicos" type="tsValor"/> |
|||
<xsd:element name="ValorDeducoes" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="ValorPis" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="ValorCofins" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="ValorInss" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="ValorIr" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="ValorCsll" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="IssRetido" type="tsSimNao"/> |
|||
<xsd:element name="ValorIss" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="ValorIssRetido" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="OutrasRetencoes" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="BaseCalculo" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="Aliquota" type="tsAliquota" minOccurs="0"/> |
|||
<xsd:element name="ValorLiquidoNfse" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="DescontoIncondicionado" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="DescontoCondicionado" type="tsValor" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcDadosServico"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Valores" type="tcValores"/> |
|||
<xsd:element name="ItemListaServico" type="tsItemListaServico"/> |
|||
<xsd:element name="CodigoCnae" type="tsCodigoCnae" minOccurs="0"/> |
|||
<xsd:element name="CodigoTributacaoMunicipio" type="tsCodigoTributacao" minOccurs="0"/> |
|||
<xsd:element name="Discriminacao" type="tsDiscriminacao"/> |
|||
<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcDadosConstrucaoCivil"> |
|||
<xsd:sequence> |
|||
<xsd:element name="CodigoObra" type="tsCodigoObra"/> |
|||
<xsd:element name="Art" type="tsArt"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcDadosPrestador"> |
|||
<xsd:sequence> |
|||
<xsd:element name="IdentificacaoPrestador" type="tcIdentificacaoPrestador"/> |
|||
<xsd:element name="RazaoSocial" type="tsRazaoSocial"/> |
|||
<xsd:element name="NomeFantasia" type="tsNomeFantasia" minOccurs="0"/> |
|||
<xsd:element name="Endereco" type="tcEndereco"/> |
|||
<xsd:element name="Contato" type="tcContato" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcInfRps"> |
|||
<xsd:sequence> |
|||
<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/> |
|||
<xsd:element name="DataEmissao" type="xsd:dateTime"/> |
|||
<xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao"/> |
|||
<xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0"/> |
|||
<xsd:element name="OptanteSimplesNacional" type="tsSimNao"/> |
|||
<xsd:element name="IncentivadorCultural" type="tsSimNao"/> |
|||
<xsd:element name="Status" type="tsStatusRps"/> |
|||
<xsd:element name="RpsSubstituido" type="tcIdentificacaoRps" minOccurs="0"/> |
|||
<xsd:element name="Servico" type="tcDadosServico"/> |
|||
<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/> |
|||
<xsd:element name="Tomador" type="tcDadosTomador"/> |
|||
<xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/> |
|||
<xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="Id" type="tsIdTag"/> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcRps"> |
|||
<xsd:sequence> |
|||
<xsd:element name="InfRps" type="tcInfRps"/> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcIdentificacaoNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Numero" type="tsNumeroNfse"/> |
|||
<xsd:element name="Cnpj" type="tsCnpj"/> |
|||
<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/> |
|||
<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcInfNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Numero" type="tsNumeroNfse"/> |
|||
<xsd:element name="CodigoVerificacao" type="tsCodigoVerificacao"/> |
|||
<xsd:element name="DataEmissao" type="xsd:dateTime"/> |
|||
<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="0"/> |
|||
<xsd:element name="DataEmissaoRps" type="xsd:date" minOccurs="0"/> |
|||
<xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao"/> |
|||
<xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0"/> |
|||
<xsd:element name="OptanteSimplesNacional" type="tsSimNao"/> |
|||
<xsd:element name="IncentivadorCultural" type="tsSimNao"/> |
|||
<xsd:element name="Competencia" type="xsd:date"/> |
|||
<xsd:element name="NfseSubstituida" type="tsNumeroNfse" minOccurs="0"/> |
|||
<xsd:element name="OutrasInformacoes" type="tsOutrasInformacoes" minOccurs="0"/> |
|||
<xsd:element name="Servico" type="tcDadosServico"/> |
|||
<xsd:element name="ValorCredito" type="tsValor" minOccurs="0"/> |
|||
<xsd:element name="PrestadorServico" type="tcDadosPrestador"/> |
|||
<xsd:element name="TomadorServico" type="tcDadosTomador"/> |
|||
<xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/> |
|||
<xsd:element name="OrgaoGerador" type="tcIdentificacaoOrgaoGerador"/> |
|||
<xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="Id" type="tsIdTag"/> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="InfNfse" type="tcInfNfse"/> |
|||
<xsd:element ref="dsig:Signature" maxOccurs="2"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcInfPedidoCancelamento"> |
|||
<xsd:sequence> |
|||
<xsd:element name="IdentificacaoNfse" type="tcIdentificacaoNfse"/> |
|||
<xsd:element name="CodigoCancelamento" type="tsCodigoCancelamentoNfse"/> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="Id" type="tsIdTag"/> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcPedidoCancelamento"> |
|||
<xsd:sequence> |
|||
<xsd:element name="InfPedidoCancelamento" type="tcInfPedidoCancelamento"/> |
|||
<xsd:element ref="dsig:Signature" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcInfConfirmacaoCancelamento"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Sucesso" type="xsd:boolean"/> |
|||
<xsd:element name="DataHora" type="xsd:dateTime"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcConfirmacaoCancelamento"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Pedido" type="tcPedidoCancelamento"/> |
|||
<xsd:element name="InfConfirmacaoCancelamento" type="tcInfConfirmacaoCancelamento"/> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="Id" type="tsIdTag"/> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcCancelamentoNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Confirmacao" type="tcConfirmacaoCancelamento"/> |
|||
<xsd:element ref="dsig:Signature"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcInfSubstituicaoNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="NfseSubstituidora" type="tsNumeroNfse"/> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="Id" type="tsIdTag"/> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcSubstituicaoNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="SubstituicaoNfse" type="tcInfSubstituicaoNfse"/> |
|||
<xsd:element ref="dsig:Signature" maxOccurs="2"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcCompNfse"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Nfse" type="tcNfse"/> |
|||
<xsd:element name="NfseCancelamento" type="tcCancelamentoNfse" minOccurs="0"/> |
|||
<xsd:element name="NfseSubstituicao" type="tcSubstituicaoNfse" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:element name="ListaMensagemRetorno"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="MensagemRetorno" type="tcMensagemRetorno" maxOccurs="unbounded"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:complexType name="tcMensagemRetorno"> |
|||
<xsd:sequence> |
|||
<xsd:element name="Codigo" type="tsCodigoMensagemAlerta"/> |
|||
<xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta"/> |
|||
<xsd:element name="Correcao" type="tsDescricaoMensagemAlerta" minOccurs="0"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcMensagemRetornoLote"> |
|||
<xsd:sequence> |
|||
<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/> |
|||
<xsd:element name="Codigo" type="tsCodigoMensagemAlerta"/> |
|||
<xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
<xsd:complexType name="tcLoteRps"> |
|||
<xsd:sequence> |
|||
<xsd:element name="NumeroLote" type="tsNumeroLote"/> |
|||
<xsd:element name="Cnpj" type="tsCnpj"/> |
|||
<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal"/> |
|||
<xsd:element name="QuantidadeRps" type="tsQuantidadeRps"/> |
|||
<xsd:element name="ListaRps"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="Rps" type="tcRps" maxOccurs="unbounded"/> |
|||
</xsd:sequence> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="Id" type="tsIdTag"/> |
|||
</xsd:complexType> |
|||
</xsd:schema> |
|||
@ -0,0 +1,316 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Schema for XML Signatures |
|||
http://www.w3.org/2000/09/xmldsig# |
|||
$Revision: 1.7 $ on $Date: 2007/09/20 19:06:50 $ by $Author: p052373 $ |
|||
|
|||
Copyright 2001 The Internet Society and W3C (Massachusetts Institute |
|||
of Technology, Institut National de Recherche en Informatique et en |
|||
Automatique, Keio University). All Rights Reserved. |
|||
http://www.w3.org/Consortium/Legal/ |
|||
|
|||
This document is governed by the W3C Software License [1] as described |
|||
in the FAQ [2]. |
|||
|
|||
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720 |
|||
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD |
|||
--> |
|||
|
|||
<!-- |
|||
|
|||
Download em 23/02/2007 |
|||
Link: |
|||
http://www.w3.org/TR/xmldsig-core/#sec-Schema |
|||
http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema_v03.xsd |
|||
|
|||
--> |
|||
|
|||
<schema xmlns="http://www.w3.org/2001/XMLSchema" |
|||
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" |
|||
targetNamespace="http://www.w3.org/2000/09/xmldsig#" |
|||
version="0.1" elementFormDefault="qualified"> |
|||
|
|||
<!-- Basic Types Defined for Signatures --> |
|||
|
|||
<simpleType name="CryptoBinary"> |
|||
<restriction base="base64Binary"> |
|||
</restriction> |
|||
</simpleType> |
|||
|
|||
<!-- Start Signature --> |
|||
|
|||
<element name="Signature" type="ds:SignatureType"/> |
|||
<complexType name="SignatureType"> |
|||
<sequence> |
|||
<element ref="ds:SignedInfo"/> |
|||
<element ref="ds:SignatureValue"/> |
|||
<element ref="ds:KeyInfo" minOccurs="0"/> |
|||
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> |
|||
</sequence> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="SignatureValue" type="ds:SignatureValueType"/> |
|||
<complexType name="SignatureValueType"> |
|||
<simpleContent> |
|||
<extension base="base64Binary"> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</extension> |
|||
</simpleContent> |
|||
</complexType> |
|||
|
|||
<!-- Start SignedInfo --> |
|||
|
|||
<element name="SignedInfo" type="ds:SignedInfoType"/> |
|||
<complexType name="SignedInfoType"> |
|||
<sequence> |
|||
<element ref="ds:CanonicalizationMethod"/> |
|||
<element ref="ds:SignatureMethod"/> |
|||
<element ref="ds:Reference" maxOccurs="unbounded"/> |
|||
</sequence> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> |
|||
<complexType name="CanonicalizationMethodType" mixed="true"> |
|||
<sequence> |
|||
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/> |
|||
<!-- (0,unbounded) elements from (1,1) namespace --> |
|||
</sequence> |
|||
<attribute name="Algorithm" type="anyURI" use="required"/> |
|||
</complexType> |
|||
|
|||
<element name="SignatureMethod" type="ds:SignatureMethodType"/> |
|||
<complexType name="SignatureMethodType" mixed="true"> |
|||
<sequence> |
|||
<element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/> |
|||
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> |
|||
<!-- (0,unbounded) elements from (1,1) external namespace --> |
|||
</sequence> |
|||
<attribute name="Algorithm" type="anyURI" use="required"/> |
|||
</complexType> |
|||
|
|||
<!-- Start Reference --> |
|||
|
|||
<element name="Reference" type="ds:ReferenceType"/> |
|||
<complexType name="ReferenceType"> |
|||
<sequence> |
|||
<element ref="ds:Transforms" minOccurs="0"/> |
|||
<element ref="ds:DigestMethod"/> |
|||
<element ref="ds:DigestValue"/> |
|||
</sequence> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
<attribute name="URI" type="anyURI" use="optional"/> |
|||
<attribute name="Type" type="anyURI" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="Transforms" type="ds:TransformsType"/> |
|||
<complexType name="TransformsType"> |
|||
<sequence> |
|||
<element ref="ds:Transform" maxOccurs="unbounded"/> |
|||
</sequence> |
|||
</complexType> |
|||
|
|||
<element name="Transform" type="ds:TransformType"/> |
|||
<complexType name="TransformType" mixed="true"> |
|||
<choice minOccurs="0" maxOccurs="unbounded"> |
|||
<any namespace="##other" processContents="lax"/> |
|||
<!-- (1,1) elements from (0,unbounded) namespaces --> |
|||
<element name="XPath" type="string"/> |
|||
</choice> |
|||
<attribute name="Algorithm" type="anyURI" use="required"/> |
|||
</complexType> |
|||
|
|||
<!-- End Reference --> |
|||
|
|||
<element name="DigestMethod" type="ds:DigestMethodType"/> |
|||
<complexType name="DigestMethodType" mixed="true"> |
|||
<sequence> |
|||
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
|||
</sequence> |
|||
<attribute name="Algorithm" type="anyURI" use="required"/> |
|||
</complexType> |
|||
|
|||
<element name="DigestValue" type="ds:DigestValueType"/> |
|||
<simpleType name="DigestValueType"> |
|||
<restriction base="base64Binary"/> |
|||
</simpleType> |
|||
|
|||
<!-- End SignedInfo --> |
|||
|
|||
<!-- Start KeyInfo --> |
|||
|
|||
<element name="KeyInfo" type="ds:KeyInfoType"/> |
|||
<complexType name="KeyInfoType" mixed="true"> |
|||
<choice maxOccurs="unbounded"> |
|||
<element ref="ds:KeyName"/> |
|||
<element ref="ds:KeyValue"/> |
|||
<element ref="ds:RetrievalMethod"/> |
|||
<element ref="ds:X509Data"/> |
|||
<element ref="ds:PGPData"/> |
|||
<element ref="ds:SPKIData"/> |
|||
<element ref="ds:MgmtData"/> |
|||
<any processContents="lax" namespace="##other"/> |
|||
<!-- (1,1) elements from (0,unbounded) namespaces --> |
|||
</choice> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="KeyName" type="string"/> |
|||
<element name="MgmtData" type="string"/> |
|||
|
|||
<element name="KeyValue" type="ds:KeyValueType"/> |
|||
<complexType name="KeyValueType" mixed="true"> |
|||
<choice> |
|||
<element ref="ds:DSAKeyValue"/> |
|||
<element ref="ds:RSAKeyValue"/> |
|||
<any namespace="##other" processContents="lax"/> |
|||
</choice> |
|||
</complexType> |
|||
|
|||
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/> |
|||
<complexType name="RetrievalMethodType"> |
|||
<sequence> |
|||
<element ref="ds:Transforms" minOccurs="0"/> |
|||
</sequence> |
|||
<attribute name="URI" type="anyURI"/> |
|||
<attribute name="Type" type="anyURI" use="optional"/> |
|||
</complexType> |
|||
|
|||
<!-- Start X509Data --> |
|||
|
|||
<element name="X509Data" type="ds:X509DataType"/> |
|||
<complexType name="X509DataType"> |
|||
<sequence maxOccurs="unbounded"> |
|||
<choice> |
|||
<element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/> |
|||
<element name="X509SKI" type="base64Binary"/> |
|||
<element name="X509SubjectName" type="string"/> |
|||
<element name="X509Certificate" type="base64Binary"/> |
|||
<element name="X509CRL" type="base64Binary"/> |
|||
<any namespace="##other" processContents="lax"/> |
|||
</choice> |
|||
</sequence> |
|||
</complexType> |
|||
|
|||
<complexType name="X509IssuerSerialType"> |
|||
<sequence> |
|||
<element name="X509IssuerName" type="string"/> |
|||
<element name="X509SerialNumber" type="integer"/> |
|||
</sequence> |
|||
</complexType> |
|||
|
|||
<!-- End X509Data --> |
|||
|
|||
<!-- Begin PGPData --> |
|||
|
|||
<element name="PGPData" type="ds:PGPDataType"/> |
|||
<complexType name="PGPDataType"> |
|||
<choice> |
|||
<sequence> |
|||
<element name="PGPKeyID" type="base64Binary"/> |
|||
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> |
|||
<any namespace="##other" processContents="lax" minOccurs="0" |
|||
maxOccurs="unbounded"/> |
|||
</sequence> |
|||
<sequence> |
|||
<element name="PGPKeyPacket" type="base64Binary"/> |
|||
<any namespace="##other" processContents="lax" minOccurs="0" |
|||
maxOccurs="unbounded"/> |
|||
</sequence> |
|||
</choice> |
|||
</complexType> |
|||
|
|||
<!-- End PGPData --> |
|||
|
|||
<!-- Begin SPKIData --> |
|||
|
|||
<element name="SPKIData" type="ds:SPKIDataType"/> |
|||
<complexType name="SPKIDataType"> |
|||
<sequence maxOccurs="unbounded"> |
|||
<element name="SPKISexp" type="base64Binary"/> |
|||
<any namespace="##other" processContents="lax" minOccurs="0"/> |
|||
</sequence> |
|||
</complexType> |
|||
|
|||
<!-- End SPKIData --> |
|||
|
|||
<!-- End KeyInfo --> |
|||
|
|||
<!-- Start Object (Manifest, SignatureProperty) --> |
|||
|
|||
<element name="Object" type="ds:ObjectType"/> |
|||
<complexType name="ObjectType" mixed="true"> |
|||
<sequence minOccurs="0" maxOccurs="unbounded"> |
|||
<any namespace="##any" processContents="lax"/> |
|||
</sequence> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
<attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet --> |
|||
<attribute name="Encoding" type="anyURI" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="Manifest" type="ds:ManifestType"/> |
|||
<complexType name="ManifestType"> |
|||
<sequence> |
|||
<element ref="ds:Reference" maxOccurs="unbounded"/> |
|||
</sequence> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> |
|||
<complexType name="SignaturePropertiesType"> |
|||
<sequence> |
|||
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/> |
|||
</sequence> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</complexType> |
|||
|
|||
<element name="SignatureProperty" type="ds:SignaturePropertyType"/> |
|||
<complexType name="SignaturePropertyType" mixed="true"> |
|||
<choice maxOccurs="unbounded"> |
|||
<any namespace="##other" processContents="lax"/> |
|||
<!-- (1,1) elements from (1,unbounded) namespaces --> |
|||
</choice> |
|||
<attribute name="Target" type="anyURI" use="required"/> |
|||
<attribute name="Id" type="ID" use="optional"/> |
|||
</complexType> |
|||
|
|||
<!-- End Object (Manifest, SignatureProperty) --> |
|||
|
|||
<!-- Start Algorithm Parameters --> |
|||
|
|||
<simpleType name="HMACOutputLengthType"> |
|||
<restriction base="integer"/> |
|||
</simpleType> |
|||
|
|||
<!-- Start KeyValue Element-types --> |
|||
|
|||
<element name="DSAKeyValue" type="ds:DSAKeyValueType"/> |
|||
<complexType name="DSAKeyValueType"> |
|||
<sequence> |
|||
<sequence minOccurs="0"> |
|||
<element name="P" type="ds:CryptoBinary"/> |
|||
<element name="Q" type="ds:CryptoBinary"/> |
|||
</sequence> |
|||
<element name="G" type="ds:CryptoBinary" minOccurs="0"/> |
|||
<element name="Y" type="ds:CryptoBinary"/> |
|||
<element name="J" type="ds:CryptoBinary" minOccurs="0"/> |
|||
<sequence minOccurs="0"> |
|||
<element name="Seed" type="ds:CryptoBinary"/> |
|||
<element name="PgenCounter" type="ds:CryptoBinary"/> |
|||
</sequence> |
|||
</sequence> |
|||
</complexType> |
|||
|
|||
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/> |
|||
<complexType name="RSAKeyValueType"> |
|||
<sequence> |
|||
<element name="Modulus" type="ds:CryptoBinary"/> |
|||
<element name="Exponent" type="ds:CryptoBinary"/> |
|||
</sequence> |
|||
</complexType> |
|||
|
|||
<!-- End KeyValue Element-types --> |
|||
|
|||
<!-- End Signature --> |
|||
|
|||
</schema> |
|||
@ -0,0 +1,273 @@ |
|||
try: |
|||
from pynfe.utils.nfse.betha import nfse_v202 as nfse_schema |
|||
from pyxb import BIND |
|||
except: |
|||
pass # modulo necessario apenas para NFS-e. |
|||
|
|||
|
|||
class SerializacaoAutorizador(): |
|||
pass |
|||
|
|||
|
|||
class SerializacaoBetha(SerializacaoAutorizador): |
|||
def __init__(self): |
|||
if 'nfse_schema' not in globals(): |
|||
raise ImportError('No module named nfse_v202 or PyXB') |
|||
|
|||
def serializar_gerar(self, nfse): |
|||
"""Retorna string de um XML gerado a partir do |
|||
XML Schema (XSD). Binding gerado pelo modulo PyXB.""" |
|||
|
|||
servico = nfse_schema.tcDadosServico() |
|||
valores_servico = nfse_schema.tcValoresDeclaracaoServico() |
|||
valores_servico.ValorServicos = nfse.servico.valor_servico |
|||
|
|||
servico.IssRetido = nfse.servico.iss_retido |
|||
servico.ItemListaServico = nfse.servico.item_lista |
|||
servico.Discriminacao = nfse.servico.discriminacao |
|||
servico.CodigoMunicipio = nfse.servico.codigo_municipio |
|||
servico.ExigibilidadeISS = nfse.servico.exigibilidade |
|||
servico.MunicipioIncidencia = nfse.servico.municipio_incidencia |
|||
servico.Valores = valores_servico |
|||
|
|||
# Prestador |
|||
id_prestador = nfse_schema.tcIdentificacaoPrestador() |
|||
id_prestador.CpfCnpj = nfse.emitente.cnpj |
|||
id_prestador.InscricaoMunicipal = nfse.emitente.inscricao_municipal |
|||
|
|||
# Cliente |
|||
id_tomador = nfse_schema.tcIdentificacaoTomador() |
|||
id_tomador.CpfCnpj = nfse.cliente.numero_documento |
|||
if nfse.cliente.inscricao_municipal: |
|||
id_tomador.InscricaoMunicipal = nfse.cliente.inscricao_municipal |
|||
|
|||
endereco_tomador = nfse_schema.tcEndereco() |
|||
endereco_tomador.Endereco = nfse.cliente.endereco_logradouro |
|||
endereco_tomador.Numero = nfse.cliente.endereco_numero |
|||
endereco_tomador.Bairro = nfse.cliente.endereco_bairro |
|||
endereco_tomador.CodigoMunicipio = nfse.cliente.endereco_cod_municipio |
|||
endereco_tomador.Uf = nfse.cliente.endereco_uf |
|||
endereco_tomador.CodigoPais = nfse.cliente.endereco_pais |
|||
endereco_tomador.Cep = nfse.cliente.endereco_cep |
|||
|
|||
tomador = nfse_schema.tcDadosTomador() |
|||
tomador.IdentificacaoPrestador = id_tomador |
|||
tomador.RazaoSocial = nfse.cliente.razao_social |
|||
tomador.Endereco = endereco_tomador |
|||
|
|||
id_rps = nfse_schema.tcIdentificacaoRps() |
|||
id_rps.Numero = nfse.identificador |
|||
id_rps.Serie = nfse.serie |
|||
id_rps.Tipo = nfse.tipo |
|||
|
|||
rps = nfse_schema.tcInfRps() |
|||
rps.IdentificacaoRps = id_rps |
|||
rps.DataEmissao = nfse.data_emissao.strftime('%Y-%m-%d') |
|||
rps.Status = 1 |
|||
|
|||
inf_declaracao_servico = nfse_schema.tcInfDeclaracaoPrestacaoServico() |
|||
inf_declaracao_servico.Competencia = nfse.data_emissao.strftime('%Y-%m-%d') |
|||
inf_declaracao_servico.Servico = servico |
|||
inf_declaracao_servico.Prestador = id_prestador |
|||
inf_declaracao_servico.Tomador = tomador |
|||
inf_declaracao_servico.OptanteSimplesNacional = nfse.simples |
|||
inf_declaracao_servico.IncentivoFiscal = nfse.incentivo |
|||
inf_declaracao_servico.Id = nfse.identificador |
|||
inf_declaracao_servico.Rps = rps |
|||
|
|||
declaracao_servico = nfse_schema.tcDeclaracaoPrestacaoServico() |
|||
declaracao_servico.InfDeclaracaoPrestacaoServico = inf_declaracao_servico |
|||
|
|||
gnfse = nfse_schema.GerarNfseEnvio() |
|||
gnfse.Rps = declaracao_servico |
|||
|
|||
return gnfse.toxml(element_name='GerarNfseEnvio') |
|||
|
|||
def _serializar_lote_sincrono(self, nfse): |
|||
"""Retorna string de um XML gerado a partir do |
|||
XML Schema (XSD). Binding gerado pelo modulo PyXB.""" |
|||
|
|||
servico = nfse_schema.tcDadosServico() |
|||
valores_servico = nfse_schema.tcValoresDeclaracaoServico() |
|||
valores_servico.ValorServicos = nfse.servico.valor_servico |
|||
|
|||
servico.IssRetido = nfse.servico.iss_retido |
|||
servico.ItemListaServico = nfse.servico.item_lista |
|||
servico.Discriminacao = nfse.servico.discriminacao |
|||
servico.CodigoMunicipio = nfse.servico.codigo_municipio |
|||
servico.ExigibilidadeISS = nfse.servico.exigibilidade |
|||
servico.MunicipioIncidencia = nfse.servico.municipio_incidencia |
|||
servico.Valores = valores_servico |
|||
|
|||
# Prestador |
|||
id_prestador = nfse_schema.tcIdentificacaoPrestador() |
|||
id_prestador.CpfCnpj = nfse.emitente.cnpj |
|||
id_prestador.InscricaoMunicipal = nfse.emitente.inscricao_municipal |
|||
|
|||
# Cliente |
|||
id_tomador = nfse_schema.tcIdentificacaoTomador() |
|||
id_tomador.CpfCnpj = nfse.cliente.numero_documento |
|||
if nfse.cliente.inscricao_municipal: |
|||
id_tomador.InscricaoMunicipal = nfse.cliente.inscricao_municipal |
|||
|
|||
endereco_tomador = nfse_schema.tcEndereco() |
|||
endereco_tomador.Endereco = nfse.cliente.endereco_logradouro |
|||
endereco_tomador.Numero = nfse.cliente.endereco_numero |
|||
endereco_tomador.Bairro = nfse.cliente.endereco_bairro |
|||
endereco_tomador.CodigoMunicipio = nfse.cliente.endereco_cod_municipio |
|||
endereco_tomador.Uf = nfse.cliente.endereco_uf |
|||
endereco_tomador.CodigoPais = nfse.cliente.endereco_pais |
|||
endereco_tomador.Cep = nfse.cliente.endereco_cep |
|||
|
|||
tomador = nfse_schema.tcDadosTomador() |
|||
tomador.IdentificacaoPrestador = id_tomador |
|||
tomador.RazaoSocial = nfse.cliente.razao_social |
|||
tomador.Endereco = endereco_tomador |
|||
|
|||
id_rps = nfse_schema.tcIdentificacaoRps() |
|||
id_rps.Numero = nfse.identificador |
|||
id_rps.Serie = nfse.serie |
|||
id_rps.Tipo = nfse.tipo |
|||
|
|||
rps = nfse_schema.tcInfRps() |
|||
rps.IdentificacaoRps = id_rps |
|||
rps.DataEmissao = nfse.data_emissao.strftime('%Y-%m-%d') |
|||
rps.Status = 1 |
|||
|
|||
inf_declaracao_servico = nfse_schema.tcInfDeclaracaoPrestacaoServico() |
|||
inf_declaracao_servico.Competencia = nfse.data_emissao.strftime('%Y-%m-%d') |
|||
inf_declaracao_servico.Servico = servico |
|||
inf_declaracao_servico.Prestador = id_prestador |
|||
inf_declaracao_servico.Tomador = tomador |
|||
inf_declaracao_servico.OptanteSimplesNacional = nfse.simples |
|||
inf_declaracao_servico.IncentivoFiscal = nfse.incentivo |
|||
inf_declaracao_servico.Id = nfse.identificador |
|||
inf_declaracao_servico.Rps = rps |
|||
|
|||
declaracao_servico = nfse_schema.tcDeclaracaoPrestacaoServico() |
|||
declaracao_servico.InfDeclaracaoPrestacaoServico = inf_declaracao_servico |
|||
|
|||
lote = nfse_schema.tcLoteRps() |
|||
lote.NumeroLote = 1 |
|||
lote.Id = 1 |
|||
lote.CpfCnpj = nfse.emitente.cnpj |
|||
lote.InscricaoMunicipal = nfse.emitente.inscricao_municipal |
|||
lote.QuantidadeRps = 1 |
|||
if nfse.autorizador.upper() == 'BETHA': |
|||
lote.versao = '2.02' |
|||
lote.ListaRps = BIND(declaracao_servico) |
|||
|
|||
gnfse = nfse_schema.EnviarLoteRpsSincronoEnvio() |
|||
gnfse.LoteRps = lote |
|||
|
|||
return gnfse.toxml(element_name='EnviarLoteRpsSincronoEnvio') |
|||
|
|||
def _serializar_emitente(self, emitente, tag_raiz='Prestador', retorna_string=False): |
|||
raiz = etree.Element(tag_raiz) |
|||
documento = etree.SubElement(raiz, 'CpfCnpj') |
|||
etree.SubElement(documento, 'Cnpj').text = emitente.cnpj |
|||
etree.SubElement(raiz, 'InscricaoMunicipal').text = emitente.inscricao_municipal |
|||
|
|||
if retorna_string: |
|||
return etree.tostring(raiz, encoding="unicode", pretty_print=True) |
|||
else: |
|||
return raiz |
|||
|
|||
def _serializar_cliente(self, cliente, tag_raiz='Tomador', retorna_string=False): |
|||
raiz = etree.Element(tag_raiz) |
|||
identificacao = etree.SubElement(raiz, 'IdentificacaoTomador') |
|||
documento = etree.SubElement(identificacao, 'CpfCnpj') |
|||
etree.SubElement(documento, cliente.tipo_documento).text = cliente.numero_documento # Apenas Cnpj ?? |
|||
etree.SubElement(identificacao, 'InscricaoMunicipal').text = cliente.inscricao_municipal # obrigatório?? |
|||
etree.SubElement(raiz, 'RazaoSocial').text = cliente.razao_social |
|||
endereco = etree.SubElement(raiz, 'Endereco') |
|||
etree.SubElement(endereco, 'Endereco').text = cliente.endereco_logradouro |
|||
etree.SubElement(endereco, 'Numero').text = cliente.endereco_numero |
|||
if cliente.endereco_complemento: |
|||
etree.SubElement(endereco, 'Complemento').text = cliente.endereco_complemento |
|||
etree.SubElement(endereco, 'Bairro').text = cliente.endereco_bairro |
|||
etree.SubElement(endereco, 'CodigoMunicipio').text = obter_codigo_por_municipio( |
|||
cliente.endereco_municipio, cliente.endereco_uf) |
|||
etree.SubElement(endereco, 'Uf').text = cliente.endereco_uf |
|||
etree.SubElement(endereco, 'CodigoPais').text = cliente.endereco_pais |
|||
etree.SubElement(endereco, 'Cep').text = so_numeros(cliente.endereco_cep) |
|||
contato = etree.SubElement(raiz, 'Contato') |
|||
etree.SubElement(contato, 'Telefone').text = cliente.endereco_telefone |
|||
etree.SubElement(contato, 'Email').text = cliente.email |
|||
|
|||
if retorna_string: |
|||
return etree.tostring(raiz, encoding="unicode", pretty_print=True) |
|||
else: |
|||
return raiz |
|||
|
|||
def _serializar_servico(self, servico, tag_raiz='Servico', retorna_string=False): |
|||
raiz = etree.Element(tag_raiz) |
|||
valores = etree.SubElement(raiz, 'Valores') |
|||
etree.SubElement(valores, 'ValorServicos').text = str('{:.2f}').format(servico.valor_servico) |
|||
etree.SubElement(raiz, 'IssRetido').text = str(servico.iss_retido) |
|||
#etree.SubElement(raiz, 'ResponsavelRetencao').text = '' |
|||
etree.SubElement(raiz, 'ItemListaServico').text = servico.item_lista |
|||
#etree.SubElement(raiz, 'CodigoCnae').text = '' |
|||
#etree.SubElement(raiz, 'CodigoTributacaoMunicipio').text = '' |
|||
etree.SubElement(raiz, 'Discriminacao').text = servico.discriminacao |
|||
etree.SubElement(raiz, 'CodigoMunicipio').text = servico.codigo_municipio |
|||
#etree.SubElement(raiz, 'CodigoPais').text = '' |
|||
""" |
|||
1 – Exigível; |
|||
2 – Não incidência; |
|||
3 – Isenção; |
|||
4 – Exportação; |
|||
5 – Imunidade; |
|||
6 – Exigibilidade Suspensa por Decisão Judicial; |
|||
7 – Exigibilidade Suspensa por ProcessoAdministrativo |
|||
""" |
|||
etree.SubElement(raiz, 'ExigibilidadeISS').text = str(servico.exigibilidade) |
|||
etree.SubElement(raiz, 'MunicipioIncidencia').text = servico.codigo_municipio |
|||
#etree.SubElement(raiz, 'NumeroProcesso').text = '' |
|||
|
|||
if retorna_string: |
|||
return etree.tostring(raiz, encoding="unicode", pretty_print=True) |
|||
else: |
|||
return raiz |
|||
|
|||
def _serializar_gerar(self, nfse, tag_raiz='GerarNfseEnvio', retorna_string=False): |
|||
|
|||
if nfse.autorizador.upper() == 'BETHA': |
|||
raiz = etree.Element(tag_raiz, xmlns=NAMESPACE_BETHA) |
|||
# TODO - implementar outros sistemas autorizadores |
|||
else: |
|||
raiz = etree.Element(tag_raiz) |
|||
rps = etree.SubElement(raiz, 'Rps') |
|||
info = etree.SubElement(rps, 'InfDeclaracaoPrestacaoServico', Id=nfse.identificador) |
|||
etree.SubElement(info, 'Competencia').text = nfse.data_emissao.strftime('%Y-%m-%d') |
|||
|
|||
# Servico |
|||
info.append(self._serializar_servico(nfse.servico)) |
|||
# Emitente/Prestador |
|||
info.append(self._serializar_emitente(nfse.emitente)) |
|||
# Cliente/Tomador |
|||
info.append(self._serializar_cliente(nfse.cliente)) |
|||
|
|||
etree.SubElement(info, 'OptanteSimplesNacional').text = str(nfse.simples) # 1-Sim; 2-Não |
|||
etree.SubElement(info, 'IncentivoFiscal').text = str(nfse.incentivo) # 1-Sim; 2-Não |
|||
|
|||
if retorna_string: |
|||
return etree.tostring(raiz, encoding="unicode", pretty_print=True) |
|||
else: |
|||
return raiz |
|||
|
|||
def _serializar_consulta(self, nfse, tag_raiz='ConsultarNfseRpsEnvio', retorna_string=False): |
|||
if nfse.autorizador.upper() == 'BETHA': |
|||
namespace = NAMESPACE_BETHA |
|||
#versao = '2.02' |
|||
raiz = etree.Element(tag_raiz, xmlns=namespace) |
|||
identificacao = etree.SubElement(raiz, 'IdentificacaoRps') |
|||
etree.SubElement(identificacao, 'Numero').text = str(nfse.identificador) |
|||
etree.SubElement(identificacao, 'Serie').text = nfse.serie |
|||
etree.SubElement(identificacao, 'Tipo').text = nfse.tipo |
|||
raiz.append(self._serializar_emitente(nfse.emitente)) |
|||
|
|||
if retorna_string: |
|||
return etree.tostring(raiz, encoding="unicode", pretty_print=True) |
|||
else: |
|||
return raiz |
|||
2211
pynfe/utils/nfse/ginfes/_dsig.py
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4426
pynfe/utils/nfse/ginfes/_tipos.py
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,153 @@ |
|||
# ./servico_cancelar_nfse_envio_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:d5c96233f4594cafbb4962e45678cf6ef022cfbe |
|||
# Generated 2015-12-09 15:06:03.197911 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:20a9b5cc-9e97-11e5-b010-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import _dsig as _ImportedBinding__dsig |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_dsig = _ImportedBinding__dsig.Namespace |
|||
_Namespace_dsig.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 12, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element Pedido uses Python identifier Pedido |
|||
__Pedido = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(None, 'Pedido'), 'Pedido', '__httpwww_ginfes_com_brservico_cancelar_nfse_envio_v03_xsd_CTD_ANON_Pedido', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 14, 4), ) |
|||
|
|||
|
|||
Pedido = property(__Pedido.value, __Pedido.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.w3.org/2000/09/xmldsig#}Signature uses Python identifier Signature |
|||
__Signature = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), 'Signature', '__httpwww_ginfes_com_brservico_cancelar_nfse_envio_v03_xsd_CTD_ANON_httpwww_w3_org200009xmldsigSignature', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0), ) |
|||
|
|||
|
|||
Signature = property(__Signature.value, __Signature.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__Pedido.name() : __Pedido, |
|||
__Signature.name() : __Signature |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
CancelarNfseEnvio = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CancelarNfseEnvio'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 11, 1)) |
|||
Namespace.addCategoryObject('elementBinding', CancelarNfseEnvio.name().localName(), CancelarNfseEnvio) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, 'Pedido'), _ImportedBinding__tipos.tcPedidoCancelamento, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 14, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), _ImportedBinding__dsig.SignatureType, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 15, 4)) |
|||
counters.add(cc_0) |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(None, 'Pedido')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 14, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_envio_v03.xsd', 15, 4)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,145 @@ |
|||
# ./servico_cancelar_nfse_resposta_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:aecca1e58a0180461a7c12de7921a1a74e1e0bec |
|||
# Generated 2015-12-09 15:17:38.751172 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_cancelar_nfse_resposta_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:bf3eddce-9e98-11e5-8cd8-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_cancelar_nfse_resposta_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_tipos = _ImportedBinding__tipos.Namespace |
|||
_Namespace_tipos.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_resposta_v03.xsd', 6, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_cancelar_nfse_resposta_v03.xsd}Cancelamento uses Python identifier Cancelamento |
|||
__Cancelamento = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Cancelamento'), 'Cancelamento', '__httpwww_ginfes_com_brservico_cancelar_nfse_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_cancelar_nfse_resposta_v03_xsdCancelamento', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_resposta_v03.xsd', 8, 4), ) |
|||
|
|||
|
|||
Cancelamento = property(__Cancelamento.value, __Cancelamento.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/tipos_v03.xsd}ListaMensagemRetorno uses Python identifier ListaMensagemRetorno |
|||
__ListaMensagemRetorno = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), 'ListaMensagemRetorno', '__httpwww_ginfes_com_brservico_cancelar_nfse_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brtipos_v03_xsdListaMensagemRetorno', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1), ) |
|||
|
|||
|
|||
ListaMensagemRetorno = property(__ListaMensagemRetorno.value, __ListaMensagemRetorno.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__Cancelamento.name() : __Cancelamento, |
|||
__ListaMensagemRetorno.name() : __ListaMensagemRetorno |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
CancelarNfseResposta = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CancelarNfseResposta'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_resposta_v03.xsd', 5, 1)) |
|||
Namespace.addCategoryObject('elementBinding', CancelarNfseResposta.name().localName(), CancelarNfseResposta) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Cancelamento'), _ImportedBinding__tipos.tcCancelamentoNfse, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_resposta_v03.xsd', 8, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), _ImportedBinding__tipos.CTD_ANON, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Cancelamento')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_resposta_v03.xsd', 8, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_cancelar_nfse_resposta_v03.xsd', 9, 4)) |
|||
st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,171 @@ |
|||
# ./servico_consultar_lote_rps_envio_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:697b9fe8e41f8c16b673d568c46b36fb541837e6 |
|||
# Generated 2015-12-09 15:07:30.180794 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:547b339e-9e97-11e5-95de-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import _dsig as _ImportedBinding__dsig |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_dsig = _ImportedBinding__dsig.Namespace |
|||
_Namespace_dsig.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 12, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd}Prestador uses Python identifier Prestador |
|||
__Prestador = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), 'Prestador', '__httpwww_ginfes_com_brservico_consultar_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_lote_rps_envio_v03_xsdPrestador', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 14, 4), ) |
|||
|
|||
|
|||
Prestador = property(__Prestador.value, __Prestador.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_lote_rps_envio_v03.xsd}Protocolo uses Python identifier Protocolo |
|||
__Protocolo = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Protocolo'), 'Protocolo', '__httpwww_ginfes_com_brservico_consultar_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_lote_rps_envio_v03_xsdProtocolo', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 16, 4), ) |
|||
|
|||
|
|||
Protocolo = property(__Protocolo.value, __Protocolo.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.w3.org/2000/09/xmldsig#}Signature uses Python identifier Signature |
|||
__Signature = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), 'Signature', '__httpwww_ginfes_com_brservico_consultar_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_w3_org200009xmldsigSignature', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0), ) |
|||
|
|||
|
|||
Signature = property(__Signature.value, __Signature.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__Prestador.name() : __Prestador, |
|||
__Protocolo.name() : __Protocolo, |
|||
__Signature.name() : __Signature |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarLoteRpsEnvio = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarLoteRpsEnvio'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 11, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarLoteRpsEnvio.name().localName(), ConsultarLoteRpsEnvio) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), _ImportedBinding__tipos.tcIdentificacaoPrestador, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 14, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Protocolo'), _ImportedBinding__tipos.tsNumeroProtocolo, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 16, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), _ImportedBinding__dsig.SignatureType, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 18, 4)) |
|||
counters.add(cc_0) |
|||
states = [] |
|||
final_update = None |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Prestador')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 14, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Protocolo')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 16, 4)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_envio_v03.xsd', 18, 4)) |
|||
st_2 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_2) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
])) |
|||
st_1._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
st_2._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,196 @@ |
|||
# ./servico_consultar_lote_rps_resposta_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:f28c5868fa1d5c33df895525b868b7c57a20712b |
|||
# Generated 2015-12-09 15:18:11.463196 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:d2b825a4-9e98-11e5-8bb0-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import pyxb.binding.datatypes |
|||
import _tipos as _ImportedBinding__tipos |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_tipos = _ImportedBinding__tipos.Namespace |
|||
_Namespace_tipos.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 5, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd}ListaNfse uses Python identifier ListaNfse |
|||
__ListaNfse = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'ListaNfse'), 'ListaNfse', '__httpwww_ginfes_com_brservico_consultar_lote_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_lote_rps_resposta_v03_xsdListaNfse', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 7, 4), ) |
|||
|
|||
|
|||
ListaNfse = property(__ListaNfse.value, __ListaNfse.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/tipos_v03.xsd}ListaMensagemRetorno uses Python identifier ListaMensagemRetorno |
|||
__ListaMensagemRetorno = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), 'ListaMensagemRetorno', '__httpwww_ginfes_com_brservico_consultar_lote_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brtipos_v03_xsdListaMensagemRetorno', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1), ) |
|||
|
|||
|
|||
ListaMensagemRetorno = property(__ListaMensagemRetorno.value, __ListaMensagemRetorno.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__ListaNfse.name() : __ListaNfse, |
|||
__ListaMensagemRetorno.name() : __ListaMensagemRetorno |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON_ (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 8, 5) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_lote_rps_resposta_v03.xsd}CompNfse uses Python identifier CompNfse |
|||
__CompNfse = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'CompNfse'), 'CompNfse', '__httpwww_ginfes_com_brservico_consultar_lote_rps_resposta_v03_xsd_CTD_ANON__httpwww_ginfes_com_brservico_consultar_lote_rps_resposta_v03_xsdCompNfse', True, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 10, 7), ) |
|||
|
|||
|
|||
CompNfse = property(__CompNfse.value, __CompNfse.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__CompNfse.name() : __CompNfse |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarLoteRpsResposta = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarLoteRpsResposta'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 4, 98)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarLoteRpsResposta.name().localName(), ConsultarLoteRpsResposta) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ListaNfse'), CTD_ANON_, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 7, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), _ImportedBinding__tipos.CTD_ANON, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'ListaNfse')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 7, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 14, 4)) |
|||
st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
|
|||
|
|||
|
|||
CTD_ANON_._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CompNfse'), _ImportedBinding__tipos.tcCompNfse, scope=CTD_ANON_, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 10, 7))) |
|||
|
|||
def _BuildAutomaton_ (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton_ |
|||
del _BuildAutomaton_ |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'CompNfse')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_lote_rps_resposta_v03.xsd', 10, 7)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_0, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON_._Automaton = _BuildAutomaton_() |
|||
|
|||
@ -0,0 +1,332 @@ |
|||
# ./servico_consultar_nfse_envio_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:bcd004ef2977ad06e43903899e512fb1d0814ea6 |
|||
# Generated 2015-12-09 15:08:11.867458 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:6d5845b4-9e97-11e5-b7e4-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import _dsig as _ImportedBinding__dsig |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_dsig = _ImportedBinding__dsig.Namespace |
|||
_Namespace_dsig.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 7, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}Prestador uses Python identifier Prestador |
|||
__Prestador = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), 'Prestador', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdPrestador', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 9, 4), ) |
|||
|
|||
|
|||
Prestador = property(__Prestador.value, __Prestador.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}NumeroNfse uses Python identifier NumeroNfse |
|||
__NumeroNfse = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'NumeroNfse'), 'NumeroNfse', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdNumeroNfse', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 10, 4), ) |
|||
|
|||
|
|||
NumeroNfse = property(__NumeroNfse.value, __NumeroNfse.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}PeriodoEmissao uses Python identifier PeriodoEmissao |
|||
__PeriodoEmissao = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'PeriodoEmissao'), 'PeriodoEmissao', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdPeriodoEmissao', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 11, 4), ) |
|||
|
|||
|
|||
PeriodoEmissao = property(__PeriodoEmissao.value, __PeriodoEmissao.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}Tomador uses Python identifier Tomador |
|||
__Tomador = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Tomador'), 'Tomador', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdTomador', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 19, 4), ) |
|||
|
|||
|
|||
Tomador = property(__Tomador.value, __Tomador.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}IntermediarioServico uses Python identifier IntermediarioServico |
|||
__IntermediarioServico = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'IntermediarioServico'), 'IntermediarioServico', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdIntermediarioServico', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 20, 4), ) |
|||
|
|||
|
|||
IntermediarioServico = property(__IntermediarioServico.value, __IntermediarioServico.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.w3.org/2000/09/xmldsig#}Signature uses Python identifier Signature |
|||
__Signature = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), 'Signature', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON_httpwww_w3_org200009xmldsigSignature', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0), ) |
|||
|
|||
|
|||
Signature = property(__Signature.value, __Signature.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__Prestador.name() : __Prestador, |
|||
__NumeroNfse.name() : __NumeroNfse, |
|||
__PeriodoEmissao.name() : __PeriodoEmissao, |
|||
__Tomador.name() : __Tomador, |
|||
__IntermediarioServico.name() : __IntermediarioServico, |
|||
__Signature.name() : __Signature |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON_ (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 12, 5) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}DataInicial uses Python identifier DataInicial |
|||
__DataInicial = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'DataInicial'), 'DataInicial', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdDataInicial', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 14, 7), ) |
|||
|
|||
|
|||
DataInicial = property(__DataInicial.value, __DataInicial.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_envio_v03.xsd}DataFinal uses Python identifier DataFinal |
|||
__DataFinal = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'DataFinal'), 'DataFinal', '__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsd_CTD_ANON__httpwww_ginfes_com_brservico_consultar_nfse_envio_v03_xsdDataFinal', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 15, 7), ) |
|||
|
|||
|
|||
DataFinal = property(__DataFinal.value, __DataFinal.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__DataInicial.name() : __DataInicial, |
|||
__DataFinal.name() : __DataFinal |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarNfseEnvio = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarNfseEnvio'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 6, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarNfseEnvio.name().localName(), ConsultarNfseEnvio) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), _ImportedBinding__tipos.tcIdentificacaoPrestador, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 9, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'NumeroNfse'), _ImportedBinding__tipos.tsNumeroNfse, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 10, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'PeriodoEmissao'), CTD_ANON_, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 11, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Tomador'), _ImportedBinding__tipos.tcIdentificacaoTomador, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 19, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'IntermediarioServico'), _ImportedBinding__tipos.tcIdentificacaoIntermediarioServico, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 20, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), _ImportedBinding__dsig.SignatureType, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 10, 4)) |
|||
counters.add(cc_0) |
|||
cc_1 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 11, 4)) |
|||
counters.add(cc_1) |
|||
cc_2 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 19, 4)) |
|||
counters.add(cc_2) |
|||
cc_3 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 20, 4)) |
|||
counters.add(cc_3) |
|||
cc_4 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 21, 4)) |
|||
counters.add(cc_4) |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Prestador')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 9, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'NumeroNfse')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 10, 4)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_1, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'PeriodoEmissao')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 11, 4)) |
|||
st_2 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_2) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_2, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Tomador')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 19, 4)) |
|||
st_3 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_3) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_3, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'IntermediarioServico')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 20, 4)) |
|||
st_4 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_4) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_4, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 21, 4)) |
|||
st_5 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_5) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
transitions.append(fac.Transition(st_2, [ |
|||
])) |
|||
transitions.append(fac.Transition(st_3, [ |
|||
])) |
|||
transitions.append(fac.Transition(st_4, [ |
|||
])) |
|||
transitions.append(fac.Transition(st_5, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
transitions.append(fac.Transition(st_2, [ |
|||
fac.UpdateInstruction(cc_0, False) ])) |
|||
transitions.append(fac.Transition(st_3, [ |
|||
fac.UpdateInstruction(cc_0, False) ])) |
|||
transitions.append(fac.Transition(st_4, [ |
|||
fac.UpdateInstruction(cc_0, False) ])) |
|||
transitions.append(fac.Transition(st_5, [ |
|||
fac.UpdateInstruction(cc_0, False) ])) |
|||
st_1._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
fac.UpdateInstruction(cc_1, True) ])) |
|||
transitions.append(fac.Transition(st_3, [ |
|||
fac.UpdateInstruction(cc_1, False) ])) |
|||
transitions.append(fac.Transition(st_4, [ |
|||
fac.UpdateInstruction(cc_1, False) ])) |
|||
transitions.append(fac.Transition(st_5, [ |
|||
fac.UpdateInstruction(cc_1, False) ])) |
|||
st_2._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_3, [ |
|||
fac.UpdateInstruction(cc_2, True) ])) |
|||
transitions.append(fac.Transition(st_4, [ |
|||
fac.UpdateInstruction(cc_2, False) ])) |
|||
transitions.append(fac.Transition(st_5, [ |
|||
fac.UpdateInstruction(cc_2, False) ])) |
|||
st_3._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_4, [ |
|||
fac.UpdateInstruction(cc_3, True) ])) |
|||
transitions.append(fac.Transition(st_5, [ |
|||
fac.UpdateInstruction(cc_3, False) ])) |
|||
st_4._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_5, [ |
|||
fac.UpdateInstruction(cc_4, True) ])) |
|||
st_5._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
|
|||
|
|||
|
|||
CTD_ANON_._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DataInicial'), pyxb.binding.datatypes.date, scope=CTD_ANON_, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 14, 7))) |
|||
|
|||
CTD_ANON_._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'DataFinal'), pyxb.binding.datatypes.date, scope=CTD_ANON_, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 15, 7))) |
|||
|
|||
def _BuildAutomaton_ (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton_ |
|||
del _BuildAutomaton_ |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = None |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'DataInicial')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 14, 7)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'DataFinal')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_envio_v03.xsd', 15, 7)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON_._Automaton = _BuildAutomaton_() |
|||
|
|||
@ -0,0 +1,199 @@ |
|||
# ./servico_consultar_nfse_resposta_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:b5175c71df88b0c3a415c5fe507e64e89cd44743 |
|||
# Generated 2015-12-09 15:18:47.481617 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:e82c30a6-9e98-11e5-ac26-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_tipos = _ImportedBinding__tipos.Namespace |
|||
_Namespace_tipos.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 6, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd}ListaNfse uses Python identifier ListaNfse |
|||
__ListaNfse = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'ListaNfse'), 'ListaNfse', '__httpwww_ginfes_com_brservico_consultar_nfse_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_resposta_v03_xsdListaNfse', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 8, 4), ) |
|||
|
|||
|
|||
ListaNfse = property(__ListaNfse.value, __ListaNfse.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/tipos_v03.xsd}ListaMensagemRetorno uses Python identifier ListaMensagemRetorno |
|||
__ListaMensagemRetorno = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), 'ListaMensagemRetorno', '__httpwww_ginfes_com_brservico_consultar_nfse_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brtipos_v03_xsdListaMensagemRetorno', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1), ) |
|||
|
|||
|
|||
ListaMensagemRetorno = property(__ListaMensagemRetorno.value, __ListaMensagemRetorno.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__ListaNfse.name() : __ListaNfse, |
|||
__ListaMensagemRetorno.name() : __ListaMensagemRetorno |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON_ (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 9, 5) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_resposta_v03.xsd}CompNfse uses Python identifier CompNfse |
|||
__CompNfse = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'CompNfse'), 'CompNfse', '__httpwww_ginfes_com_brservico_consultar_nfse_resposta_v03_xsd_CTD_ANON__httpwww_ginfes_com_brservico_consultar_nfse_resposta_v03_xsdCompNfse', True, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 11, 7), ) |
|||
|
|||
|
|||
CompNfse = property(__CompNfse.value, __CompNfse.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__CompNfse.name() : __CompNfse |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarNfseResposta = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarNfseResposta'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 5, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarNfseResposta.name().localName(), ConsultarNfseResposta) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ListaNfse'), CTD_ANON_, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 8, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), _ImportedBinding__tipos.CTD_ANON, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'ListaNfse')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 8, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 15, 4)) |
|||
st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
|
|||
|
|||
|
|||
CTD_ANON_._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CompNfse'), _ImportedBinding__tipos.tcCompNfse, scope=CTD_ANON_, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 11, 7))) |
|||
|
|||
def _BuildAutomaton_ (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton_ |
|||
del _BuildAutomaton_ |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=None, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 11, 7)) |
|||
counters.add(cc_0) |
|||
states = [] |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'CompNfse')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_resposta_v03.xsd', 11, 7)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_0, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
st_0._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, True, containing_state=None) |
|||
CTD_ANON_._Automaton = _BuildAutomaton_() |
|||
|
|||
@ -0,0 +1,171 @@ |
|||
# ./servico_consultar_nfse_rps_envio_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:db8953a5492dc3c1515e4ddeeccf2ccc33d3c37d |
|||
# Generated 2015-12-09 15:09:21.000236 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:9687e458-9e97-11e5-978e-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import _dsig as _ImportedBinding__dsig |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_dsig = _ImportedBinding__dsig.Namespace |
|||
_Namespace_dsig.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 13, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd}IdentificacaoRps uses Python identifier IdentificacaoRps |
|||
__IdentificacaoRps = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'IdentificacaoRps'), 'IdentificacaoRps', '__httpwww_ginfes_com_brservico_consultar_nfse_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_rps_envio_v03_xsdIdentificacaoRps', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 15, 4), ) |
|||
|
|||
|
|||
IdentificacaoRps = property(__IdentificacaoRps.value, __IdentificacaoRps.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd}Prestador uses Python identifier Prestador |
|||
__Prestador = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), 'Prestador', '__httpwww_ginfes_com_brservico_consultar_nfse_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_rps_envio_v03_xsdPrestador', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 17, 4), ) |
|||
|
|||
|
|||
Prestador = property(__Prestador.value, __Prestador.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.w3.org/2000/09/xmldsig#}Signature uses Python identifier Signature |
|||
__Signature = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), 'Signature', '__httpwww_ginfes_com_brservico_consultar_nfse_rps_envio_v03_xsd_CTD_ANON_httpwww_w3_org200009xmldsigSignature', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0), ) |
|||
|
|||
|
|||
Signature = property(__Signature.value, __Signature.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__IdentificacaoRps.name() : __IdentificacaoRps, |
|||
__Prestador.name() : __Prestador, |
|||
__Signature.name() : __Signature |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarNfseRpsEnvio = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarNfseRpsEnvio'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 12, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarNfseRpsEnvio.name().localName(), ConsultarNfseRpsEnvio) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'IdentificacaoRps'), _ImportedBinding__tipos.tcIdentificacaoRps, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 15, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), _ImportedBinding__tipos.tcIdentificacaoPrestador, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 17, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), _ImportedBinding__dsig.SignatureType, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 19, 4)) |
|||
counters.add(cc_0) |
|||
states = [] |
|||
final_update = None |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'IdentificacaoRps')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 15, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Prestador')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 17, 4)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_envio_v03.xsd', 19, 4)) |
|||
st_2 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_2) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
])) |
|||
st_1._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
st_2._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,145 @@ |
|||
# ./servico_consultar_nfse_rps_resposta_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:1d57b72b09a429eb05c086adc9065ede40a35c08 |
|||
# Generated 2015-12-09 15:19:38.809105 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_nfse_rps_resposta_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:06ce3f86-9e99-11e5-ab92-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_nfse_rps_resposta_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_tipos = _ImportedBinding__tipos.Namespace |
|||
_Namespace_tipos.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_resposta_v03.xsd', 6, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_nfse_rps_resposta_v03.xsd}CompNfse uses Python identifier CompNfse |
|||
__CompNfse = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'CompNfse'), 'CompNfse', '__httpwww_ginfes_com_brservico_consultar_nfse_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_nfse_rps_resposta_v03_xsdCompNfse', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_resposta_v03.xsd', 8, 4), ) |
|||
|
|||
|
|||
CompNfse = property(__CompNfse.value, __CompNfse.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/tipos_v03.xsd}ListaMensagemRetorno uses Python identifier ListaMensagemRetorno |
|||
__ListaMensagemRetorno = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), 'ListaMensagemRetorno', '__httpwww_ginfes_com_brservico_consultar_nfse_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brtipos_v03_xsdListaMensagemRetorno', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1), ) |
|||
|
|||
|
|||
ListaMensagemRetorno = property(__ListaMensagemRetorno.value, __ListaMensagemRetorno.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__CompNfse.name() : __CompNfse, |
|||
__ListaMensagemRetorno.name() : __ListaMensagemRetorno |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarNfseRpsResposta = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarNfseRpsResposta'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_resposta_v03.xsd', 5, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarNfseRpsResposta.name().localName(), ConsultarNfseRpsResposta) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'CompNfse'), _ImportedBinding__tipos.tcCompNfse, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_resposta_v03.xsd', 8, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), _ImportedBinding__tipos.CTD_ANON, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'CompNfse')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_resposta_v03.xsd', 8, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_nfse_rps_resposta_v03.xsd', 9, 4)) |
|||
st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,171 @@ |
|||
# ./servico_consultar_situacao_lote_rps_envio_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:f3961c9c7c833725944be5f49d0873c6ca8ea639 |
|||
# Generated 2015-12-09 15:09:48.314330 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:a6a46b4a-9e97-11e5-be40-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import _dsig as _ImportedBinding__dsig |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_dsig = _ImportedBinding__dsig.Namespace |
|||
_Namespace_dsig.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 8, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd}Prestador uses Python identifier Prestador |
|||
__Prestador = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), 'Prestador', '__httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_envio_v03_xsdPrestador', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 10, 4), ) |
|||
|
|||
|
|||
Prestador = property(__Prestador.value, __Prestador.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd}Protocolo uses Python identifier Protocolo |
|||
__Protocolo = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Protocolo'), 'Protocolo', '__httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_envio_v03_xsdProtocolo', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 11, 4), ) |
|||
|
|||
|
|||
Protocolo = property(__Protocolo.value, __Protocolo.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.w3.org/2000/09/xmldsig#}Signature uses Python identifier Signature |
|||
__Signature = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), 'Signature', '__httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_w3_org200009xmldsigSignature', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0), ) |
|||
|
|||
|
|||
Signature = property(__Signature.value, __Signature.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__Prestador.name() : __Prestador, |
|||
__Protocolo.name() : __Protocolo, |
|||
__Signature.name() : __Signature |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarSituacaoLoteRpsEnvio = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarSituacaoLoteRpsEnvio'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 7, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarSituacaoLoteRpsEnvio.name().localName(), ConsultarSituacaoLoteRpsEnvio) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Prestador'), _ImportedBinding__tipos.tcIdentificacaoPrestador, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 10, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Protocolo'), _ImportedBinding__tipos.tsNumeroProtocolo, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 11, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), _ImportedBinding__dsig.SignatureType, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 12, 4)) |
|||
counters.add(cc_0) |
|||
states = [] |
|||
final_update = None |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Prestador')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 10, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Protocolo')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 11, 4)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_envio_v03.xsd', 12, 4)) |
|||
st_2 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_2) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
])) |
|||
st_1._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_2, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
st_2._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,163 @@ |
|||
# ./servico_consultar_situacao_lote_rps_resposta_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:035a28892901c557b51d91d819be756030433d31 |
|||
# Generated 2015-12-09 15:20:29.694445 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:2522bb06-9e99-11e5-a0de-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_tipos = _ImportedBinding__tipos.Namespace |
|||
_Namespace_tipos.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 6, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd}NumeroLote uses Python identifier NumeroLote |
|||
__NumeroLote = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'NumeroLote'), 'NumeroLote', '__httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_resposta_v03_xsdNumeroLote', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 9, 5), ) |
|||
|
|||
|
|||
NumeroLote = property(__NumeroLote.value, __NumeroLote.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_resposta_v03.xsd}Situacao uses Python identifier Situacao |
|||
__Situacao = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'Situacao'), 'Situacao', '__httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_resposta_v03_xsdSituacao', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 10, 5), ) |
|||
|
|||
|
|||
Situacao = property(__Situacao.value, __Situacao.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.ginfes.com.br/tipos_v03.xsd}ListaMensagemRetorno uses Python identifier ListaMensagemRetorno |
|||
__ListaMensagemRetorno = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), 'ListaMensagemRetorno', '__httpwww_ginfes_com_brservico_consultar_situacao_lote_rps_resposta_v03_xsd_CTD_ANON_httpwww_ginfes_com_brtipos_v03_xsdListaMensagemRetorno', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1), ) |
|||
|
|||
|
|||
ListaMensagemRetorno = property(__ListaMensagemRetorno.value, __ListaMensagemRetorno.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__NumeroLote.name() : __NumeroLote, |
|||
__Situacao.name() : __Situacao, |
|||
__ListaMensagemRetorno.name() : __ListaMensagemRetorno |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
ConsultarSituacaoLoteRpsResposta = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'ConsultarSituacaoLoteRpsResposta'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 5, 1)) |
|||
Namespace.addCategoryObject('elementBinding', ConsultarSituacaoLoteRpsResposta.name().localName(), ConsultarSituacaoLoteRpsResposta) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'NumeroLote'), _ImportedBinding__tipos.tsNumeroLote, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 9, 5))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'Situacao'), _ImportedBinding__tipos.tsSituacaoLoteRps, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 10, 5))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno'), _ImportedBinding__tipos.CTD_ANON, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/tipos_v03.xsd', 508, 1))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
states = [] |
|||
final_update = None |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'NumeroLote')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 9, 5)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'Situacao')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 10, 5)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_tipos, 'ListaMensagemRetorno')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_consultar_situacao_lote_rps_resposta_v03.xsd', 12, 4)) |
|||
st_2 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_2) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_1._set_transitionSet(transitions) |
|||
transitions = [] |
|||
st_2._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
@ -0,0 +1,153 @@ |
|||
# ./servico_enviar_lote_rps_envio_v03.py |
|||
# -*- coding: utf-8 -*- |
|||
# PyXB bindings for NM:712dac5bd3f3f6cf5f89daa94c22f15b489de55b |
|||
# Generated 2015-12-09 15:03:44.802532 by PyXB version 1.2.4 using Python 3.5.0.final.0 |
|||
# Namespace http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd |
|||
|
|||
from __future__ import unicode_literals |
|||
import pyxb |
|||
import pyxb.binding |
|||
import pyxb.binding.saxer |
|||
import io |
|||
import pyxb.utils.utility |
|||
import pyxb.utils.domutils |
|||
import sys |
|||
import pyxb.utils.six as _six |
|||
|
|||
# Unique identifier for bindings created at the same time |
|||
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:ce2b88d4-9e96-11e5-a16e-b8ee65084bc8') |
|||
|
|||
# Version of PyXB used to generate the bindings |
|||
_PyXBVersion = '1.2.4' |
|||
# Generated bindings are not compatible across PyXB versions |
|||
if pyxb.__version__ != _PyXBVersion: |
|||
raise pyxb.PyXBVersionError(_PyXBVersion) |
|||
|
|||
# Import bindings for namespaces imported into schema |
|||
import _tipos as _ImportedBinding__tipos |
|||
import _dsig as _ImportedBinding__dsig |
|||
import pyxb.binding.datatypes |
|||
|
|||
# NOTE: All namespace declarations are reserved within the binding |
|||
Namespace = pyxb.namespace.NamespaceForURI('http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd', create_if_missing=True) |
|||
Namespace.configureCategories(['typeBinding', 'elementBinding']) |
|||
_Namespace_dsig = _ImportedBinding__dsig.Namespace |
|||
_Namespace_dsig.configureCategories(['typeBinding', 'elementBinding']) |
|||
|
|||
def CreateFromDocument (xml_text, default_namespace=None, location_base=None): |
|||
"""Parse the given XML and use the document element to create a |
|||
Python instance. |
|||
|
|||
@param xml_text An XML document. This should be data (Python 2 |
|||
str or Python 3 bytes), or a text (Python 2 unicode or Python 3 |
|||
str) in the L{pyxb._InputEncoding} encoding. |
|||
|
|||
@keyword default_namespace The L{pyxb.Namespace} instance to use as the |
|||
default namespace where there is no default namespace in scope. |
|||
If unspecified or C{None}, the namespace of the module containing |
|||
this function will be used. |
|||
|
|||
@keyword location_base: An object to be recorded as the base of all |
|||
L{pyxb.utils.utility.Location} instances associated with events and |
|||
objects handled by the parser. You might pass the URI from which |
|||
the document was obtained. |
|||
""" |
|||
|
|||
if pyxb.XMLStyle_saxer != pyxb._XMLStyle: |
|||
dom = pyxb.utils.domutils.StringToDOM(xml_text) |
|||
return CreateFromDOM(dom.documentElement, default_namespace=default_namespace) |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base) |
|||
handler = saxer.getContentHandler() |
|||
xmld = xml_text |
|||
if isinstance(xmld, _six.text_type): |
|||
xmld = xmld.encode(pyxb._InputEncoding) |
|||
saxer.parse(io.BytesIO(xmld)) |
|||
instance = handler.rootObject() |
|||
return instance |
|||
|
|||
def CreateFromDOM (node, default_namespace=None): |
|||
"""Create a Python instance from the given DOM node. |
|||
The node tag must correspond to an element declaration in this module. |
|||
|
|||
@deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}.""" |
|||
if default_namespace is None: |
|||
default_namespace = Namespace.fallbackNamespace() |
|||
return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace) |
|||
|
|||
|
|||
# Complex type [anonymous] with content type ELEMENT_ONLY |
|||
class CTD_ANON (pyxb.binding.basis.complexTypeDefinition): |
|||
"""Complex type [anonymous] with content type ELEMENT_ONLY""" |
|||
_TypeDefinition = None |
|||
_ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY |
|||
_Abstract = False |
|||
_ExpandedName = None |
|||
_XSDLocation = pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 7, 2) |
|||
_ElementMap = {} |
|||
_AttributeMap = {} |
|||
# Base type is pyxb.binding.datatypes.anyType |
|||
|
|||
# Element {http://www.ginfes.com.br/servico_enviar_lote_rps_envio_v03.xsd}LoteRps uses Python identifier LoteRps |
|||
__LoteRps = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, 'LoteRps'), 'LoteRps', '__httpwww_ginfes_com_brservico_enviar_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_ginfes_com_brservico_enviar_lote_rps_envio_v03_xsdLoteRps', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 9, 4), ) |
|||
|
|||
|
|||
LoteRps = property(__LoteRps.value, __LoteRps.set, None, None) |
|||
|
|||
|
|||
# Element {http://www.w3.org/2000/09/xmldsig#}Signature uses Python identifier Signature |
|||
__Signature = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), 'Signature', '__httpwww_ginfes_com_brservico_enviar_lote_rps_envio_v03_xsd_CTD_ANON_httpwww_w3_org200009xmldsigSignature', False, pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0), ) |
|||
|
|||
|
|||
Signature = property(__Signature.value, __Signature.set, None, None) |
|||
|
|||
_ElementMap.update({ |
|||
__LoteRps.name() : __LoteRps, |
|||
__Signature.name() : __Signature |
|||
}) |
|||
_AttributeMap.update({ |
|||
|
|||
}) |
|||
|
|||
|
|||
|
|||
EnviarLoteRpsEnvio = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'EnviarLoteRpsEnvio'), CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 6, 1)) |
|||
Namespace.addCategoryObject('elementBinding', EnviarLoteRpsEnvio.name().localName(), EnviarLoteRpsEnvio) |
|||
|
|||
|
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'LoteRps'), _ImportedBinding__tipos.tcLoteRps, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 9, 4))) |
|||
|
|||
CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature'), _ImportedBinding__dsig.SignatureType, scope=CTD_ANON, location=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/xmldsig-core-schema20020212_v03.xsd', 41, 0))) |
|||
|
|||
def _BuildAutomaton (): |
|||
# Remove this helper function from the namespace after it is invoked |
|||
global _BuildAutomaton |
|||
del _BuildAutomaton |
|||
import pyxb.utils.fac as fac |
|||
|
|||
counters = set() |
|||
cc_0 = fac.CounterCondition(min=0, max=1, metadata=pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 10, 4)) |
|||
counters.add(cc_0) |
|||
states = [] |
|||
final_update = set() |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, 'LoteRps')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 9, 4)) |
|||
st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_0) |
|||
final_update = set() |
|||
final_update.add(fac.UpdateInstruction(cc_0, False)) |
|||
symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(_Namespace_dsig, 'Signature')), pyxb.utils.utility.Location('/home/leonardo/Downloads/xsd ginfes/servico_enviar_lote_rps_envio_v03.xsd', 10, 4)) |
|||
st_1 = fac.State(symbol, is_initial=False, final_update=final_update, is_unordered_catenation=False) |
|||
states.append(st_1) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
])) |
|||
st_0._set_transitionSet(transitions) |
|||
transitions = [] |
|||
transitions.append(fac.Transition(st_1, [ |
|||
fac.UpdateInstruction(cc_0, True) ])) |
|||
st_1._set_transitionSet(transitions) |
|||
return fac.Automaton(states, counters, False, containing_state=None) |
|||
CTD_ANON._Automaton = _BuildAutomaton() |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue