Closed antoniospneto closed 11 months ago
Interesting case, it doesn't like the ns1 on the consStatServ but it's fine with the ns0 for the nfeDadosMsg element. Their server implementation is... not pretty :)
That's just impossible to implement in the client side.
Unless if we make the http://www.portalfiscal.inf.br/nfe
the default namespace, can you try something like this?
ns_map = {
None: "http://www.portalfiscal.inf.br/nfe",
}
result = xml_serializer.render(obj, ns_map=ns_map)
I am assuming the tip above worked...
I am currently experimenting with WSDL communication using XSDATA, and a specific issue has arisen: Is there any way to disable the automatic generation of the namespace prefix in XML tags? We are facing a situation where the webservice rejects the service due to a failure in XML schema validation caused by automatically generated namespace prefixes.
Here's an example of the payload generated by XSDATA (which is rejected by the webservice):
And here is an example of how it should be (this is successfully processed by the webservice):
Note that the content of
consStatServ
is now without a prefix. The webservice in question is the Brazilian electronic invoice issuance service, available at https://www.nfe.fazenda.gov.br/.