diff --git a/nfselib/ginfes/v3_01/generatedsnamespaces.py b/nfselib/ginfes/v3_01/generatedsnamespaces.py index 69640c8..c47cb16 100644 --- a/nfselib/ginfes/v3_01/generatedsnamespaces.py +++ b/nfselib/ginfes/v3_01/generatedsnamespaces.py @@ -5,4 +5,7 @@ "ListaRpsType": 'xmlns="http://www.ginfes.com.br/tipos_v03.xsd"', "ConsultarSituacaoLoteRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"', "cabecalho": 'xmlns:ns2="http://www.ginfes.com.br/cabecalho_v03.xsd"', + "CancelarNfseEnvio": 'xmlns:p="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd" xmlns:p1="http://www.ginfes.com.br/tipos_v03.xsd"', + "ConsultarNfseRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_nfse_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"', + } diff --git a/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio_v03.py b/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio_v03.py index 4b61b5c..894ba76 100644 --- a/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio_v03.py +++ b/nfselib/ginfes/v3_01/servico_cancelar_nfse_envio_v03.py @@ -739,7 +739,7 @@ def hasContent_(self): return True else: return False - def export(self, outfile, level, namespace_='', name_='CancelarNfseEnvio', namespacedef_='', pretty_print=True): + def export(self, outfile, level, namespace_='p:', name_='CancelarNfseEnvio', namespacedef_='', pretty_print=True): imported_ns_def_ = GenerateDSNamespaceDefs_.get('CancelarNfseEnvio') if imported_ns_def_ is not None: namespacedef_ = imported_ns_def_ diff --git a/nfselib/ginfes/v3_01/tipos_v03.py b/nfselib/ginfes/v3_01/tipos_v03.py index ef9e57a..8d9377e 100644 --- a/nfselib/ginfes/v3_01/tipos_v03.py +++ b/nfselib/ginfes/v3_01/tipos_v03.py @@ -1304,7 +1304,7 @@ def export(self, outfile, level, namespace_='', name_='tcIdentificacaoRps', name self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcIdentificacaoRps') if self.hasContent_(): outfile.write('>%s' % (eol_, )) - self.exportChildren(outfile, level + 1, namespace_='', name_='tcIdentificacaoRps', pretty_print=pretty_print) + self.exportChildren(outfile, level + 1, namespace_='tipos:', name_='tcIdentificacaoRps', pretty_print=pretty_print) showIndent(outfile, level, pretty_print) outfile.write('%s' % (namespace_, name_, eol_)) else: @@ -1318,13 +1318,13 @@ def exportChildren(self, outfile, level, namespace_='', name_='tcIdentificacaoRp eol_ = '' if self.Numero is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_format_integer(self.Numero, input_name='Numero'), eol_)) + outfile.write('<%sNumero>%s%s' % (namespace_, self.gds_format_integer(self.Numero, input_name='Numero'), namespace_, eol_)) if self.Serie is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.Serie), input_name='Serie')), eol_)) + outfile.write('<%sSerie>%s%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.Serie), input_name='Serie')), namespace_, eol_)) if self.Tipo is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_format_integer(self.Tipo, input_name='Tipo'), eol_)) + outfile.write('<%sTipo>%s%s' % (namespace_, self.gds_format_integer(self.Tipo, input_name='Tipo'), namespace_, eol_)) def build(self, node): already_processed = set() self.buildAttributes(node, node.attrib, already_processed) @@ -3044,10 +3044,10 @@ def export(self, outfile, level, namespace_='', name_='tcIdentificacaoNfse', nam showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() - self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcIdentificacaoNfse') + self.exportAttributes(outfile, level, already_processed, namespace_='p1:', name_='tcIdentificacaoNfse') if self.hasContent_(): outfile.write('>%s' % (eol_, )) - self.exportChildren(outfile, level + 1, namespace_='', name_='tcIdentificacaoNfse', pretty_print=pretty_print) + self.exportChildren(outfile, level + 1, namespace_='p1:', name_='tcIdentificacaoNfse', pretty_print=pretty_print) showIndent(outfile, level, pretty_print) outfile.write('%s' % (namespace_, name_, eol_)) else: @@ -3061,16 +3061,16 @@ def exportChildren(self, outfile, level, namespace_='', name_='tcIdentificacaoNf eol_ = '' if self.Numero is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_format_integer(self.Numero, input_name='Numero'), eol_)) + outfile.write('<%sNumero>%s%s' % (namespace_, self.gds_format_integer(self.Numero, input_name='Numero'), namespace_, eol_)) if self.Cnpj is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.Cnpj), input_name='Cnpj')), eol_)) + outfile.write('<%sCnpj>%s%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.Cnpj), input_name='Cnpj')), namespace_, eol_)) if self.InscricaoMunicipal is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.InscricaoMunicipal), input_name='InscricaoMunicipal')), eol_)) + outfile.write('<%sInscricaoMunicipal>%s%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.InscricaoMunicipal), input_name='InscricaoMunicipal')), namespace_, eol_)) if self.CodigoMunicipio is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_format_integer(self.CodigoMunicipio, input_name='CodigoMunicipio'), eol_)) + outfile.write('<%sCodigoMunicipio>%s%s' % (namespace_, self.gds_format_integer(self.CodigoMunicipio, input_name='CodigoMunicipio'), namespace_, eol_)) def build(self, node): already_processed = set() self.buildAttributes(node, node.attrib, already_processed) @@ -3662,10 +3662,10 @@ def export(self, outfile, level, namespace_='', name_='tcInfPedidoCancelamento', showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() - self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcInfPedidoCancelamento') + self.exportAttributes(outfile, level, already_processed, namespace_='p1:', name_='tcInfPedidoCancelamento') if self.hasContent_(): outfile.write('>%s' % (eol_, )) - self.exportChildren(outfile, level + 1, namespace_='', name_='tcInfPedidoCancelamento', pretty_print=pretty_print) + self.exportChildren(outfile, level + 1, namespace_='p1:', name_='tcInfPedidoCancelamento', pretty_print=pretty_print) showIndent(outfile, level, pretty_print) outfile.write('%s' % (namespace_, name_, eol_)) else: @@ -3683,7 +3683,7 @@ def exportChildren(self, outfile, level, namespace_='', name_='tcInfPedidoCancel self.IdentificacaoNfse.export(outfile, level, namespace_, name_='IdentificacaoNfse', pretty_print=pretty_print) if self.CodigoCancelamento is not None: showIndent(outfile, level, pretty_print) - outfile.write('%s%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.CodigoCancelamento), input_name='CodigoCancelamento')), eol_)) + outfile.write('<%sCodigoCancelamento>%s%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.CodigoCancelamento), input_name='CodigoCancelamento')), namespace_, eol_)) def build(self, node): already_processed = set() self.buildAttributes(node, node.attrib, already_processed) @@ -3755,10 +3755,10 @@ def export(self, outfile, level, namespace_='', name_='tcPedidoCancelamento', na showIndent(outfile, level, pretty_print) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) already_processed = set() - self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcPedidoCancelamento') + self.exportAttributes(outfile, level, already_processed, namespace_='p1:', name_='tcPedidoCancelamento') if self.hasContent_(): outfile.write('>%s' % (eol_, )) - self.exportChildren(outfile, level + 1, namespace_='', name_='tcPedidoCancelamento', pretty_print=pretty_print) + self.exportChildren(outfile, level + 1, namespace_='p1:', name_='tcPedidoCancelamento', pretty_print=pretty_print) showIndent(outfile, level, pretty_print) outfile.write('%s' % (namespace_, name_, eol_)) else: