2
When I use XML in a Rest web service, it appears like this:
<getCnpjParceiroResponse xmlns="http://tempuri.org/">
<getCnpjParceiroResult
xmlns:a="http://schemas.datacontract.org/2004/07/V99SuporteTecnicoContracts"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Bairro>SAO VICENTE</a:Bairro>
<a:CEP i:nil="true"/>
<a:CNPJ>11951604000130</a:CNPJ>
<a:CaminhoLogo/>
<a:Celular i:nil="true"/>
<a:Cidade>PIRACICABA</a:Cidade>
<a:Complemento i:nil="true"/>
<a:DDD>0</a:DDD>
<a:DDDCelular>0</a:DDDCelular>
<a:DataAlteracao>0001-01-01T00:00:00</a:DataAlteracao>
<a:DataCadastro>0001-01-01T00:00:00</a:DataCadastro>
<a:Distrito i:nil="true"/>
<a:Email i:nil="true"/>
<a:Endereco>AV. CRISTOVAO COLOMBO</a:Endereco>
<a:EnderecoIPInstalacao i:nil="true"/>
<a:Estado i:nil="true"/>
<a:IDPdv>0</a:IDPdv>
<a:IDTipoEstabelecimento>0</a:IDTipoEstabelecimento>
<a:IDTipoRede>0</a:IDTipoRede>
<a:ID_Rede>0</a:ID_Rede>
<a:IS_Ativo>false</a:IS_Ativo>
<a:Latitude>0</a:Latitude>
<a:Longitude>0</a:Longitude>
<a:NomeFantasia i:nil="true"/>
<a:NomeRede i:nil="true"/>
<a:Numero i:nil="true"/>
<a:QtdeCheckOuts>0</a:QtdeCheckOuts>
<a:RazaoSocial>CONVENIENCIA RADIAL NORTE SUL LTDA EPP</a:RazaoSocial>
<a:Telefone i:nil="true"/>
<a:TokenAuthentication i:nil="true"/>
</getCnpjParceiroResult>
</getCnpjParceiroResponse>
Note to editor: @helderdarocha, we should not never add or remove anything to the original code posted in a question as this may fix the error or introduce other problems. Hit indentation and remove blank lines is ok.
– brasofilo
@brasofilo Nothing was introduced or removed from the original code. It was only endented. The only thing added was a tag, [tag:xml-namespaces], which is relevant to the question.
– helderdarocha
Now I saw @brasofilo. Sorry. I used a tool to copy the code and she introduced an XML statement. I hadn’t noticed. Anyway this does not interfere with the problem in question.
– helderdarocha
The original did not have the opening tag
<xml../>
. If the file is being generated without it, it is another problem...– brasofilo