# GerarDanfeDactePorXml

**GerarDanfeDactePorXml:** Retorna o DANFE, DACTE ou CT-eOS (representação simplificada) por XML.

URL do WSDL: [https://dfe.systax.com.br/WSDFe/DFe\_Geral.svc?wsdl](https://dfe.systax.com.br/WSDFe/DFe_Geral.svc?wsdl)

# Descrição dos campos de chamada

<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-campo-tipo-descri%C3%A7%C3%A3o" style="width: 231.75pt; background: white; border-collapse: collapse; mso-yfti-tbllook: 1184;" width="309"><tbody><tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; height: 17.25pt;"><td style="width: 39.75pt; border: solid black 1.0pt; mso-border-alt: solid black .75pt; background: #DDDDDD; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="53">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Campo</span>**

</td><td style="width: 40.5pt; border: solid black 1.0pt; border-left: none; mso-border-top-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; background: #DDDDDD; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="54">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Tipo</span>**

</td><td style="width: 85.5pt; border: solid black 1.0pt; border-left: none; mso-border-top-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; background: #DDDDDD; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="114">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Descrição</span>**

</td><td style="width: 65.25pt; border: solid black 1.0pt; border-left: none; mso-border-top-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; background: #DDDDDD; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="87">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Obrigatório </span>**

</td></tr><tr style="mso-yfti-irow: 1; height: 17.25pt;"><td style="width: 39.75pt; border: solid black 1.0pt; border-top: none; mso-border-left-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="53"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">usuario</span>

</td><td style="width: 40.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="54"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">string</span>

</td><td style="width: 85.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="114"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Usuário do DFE</span>

</td><td style="width: 65.25pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="87"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Sim</span>

</td></tr><tr style="mso-yfti-irow: 2; height: 17.25pt;"><td style="width: 39.75pt; border: solid black 1.0pt; border-top: none; mso-border-left-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="53"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">senha</span>

</td><td style="width: 40.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="54"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">string</span>

</td><td style="width: 85.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="114"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Senha do usuário</span>

</td><td style="width: 65.25pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="87"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Sim</span>

</td></tr><tr style="mso-yfti-irow: 3; height: 17.25pt;"><td style="width: 39.75pt; border: solid black 1.0pt; border-top: none; mso-border-left-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="53"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">xml</span>

</td><td style="width: 40.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="54"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">string</span>

</td><td style="width: 85.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="114"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">XML do DF-e</span>

</td><td style="width: 65.25pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="87"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Sim</span>

</td></tr><tr style="mso-yfti-irow: 4; mso-yfti-lastrow: yes; height: 17.25pt;"><td style="width: 39.75pt; border: solid black 1.0pt; border-top: none; mso-border-left-alt: solid black .75pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="53"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">modelo</span>

</td><td style="width: 40.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="54"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">string</span>

</td><td style="width: 85.5pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="114"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Modelo do DF-e</span>

</td><td style="width: 65.25pt; border-top: none; border-left: none; border-bottom: solid black 1.0pt; border-right: solid black 1.0pt; mso-border-bottom-alt: solid black .75pt; mso-border-right-alt: solid black .75pt; padding: .75pt .75pt .75pt .75pt; height: 17.25pt;" width="87"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Sim</span>

</td></tr></tbody></table>

# Descrição dos campos de retorno

<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-campo-descri%C3%A7%C3%A3o-nome" style="width: 332.75pt; background: white; border-collapse: collapse; height: 139px;" width="444"><tbody><tr style="height: 23px;"><td style="width: 137.05pt; border: 1pt solid black; background: rgb(221, 221, 221); padding: 0.75pt; height: 23px;" width="183">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Campo</span>**

</td><td style="width: 195.7pt; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; border-image: initial; border-left: none; background: rgb(221, 221, 221); padding: 0.75pt; height: 23px;" width="261">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Descrição</span>**

</td></tr><tr style="height: 31px;"><td style="width: 137.05pt; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 31px;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Nome</span>

</td><td style="width: 195.7pt; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 31px;" width="261"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Nome do arquivo com a extensão \*.pdf</span>

</td></tr><tr style="height: 23px;"><td style="width: 137.05pt; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 23px;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">ArquivoBase64String</span>

</td><td style="width: 195.7pt; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 23px;" width="261"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Conteúdo do arquivo</span>

</td></tr><tr style="height: 31px;"><td style="width: 137.05pt; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 31px;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">codigo</span>

</td><td style="width: 195.7pt; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 31px;" width="261"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Código de status de requisição</span>

</td></tr><tr style="height: 31px;"><td style="width: 137.05pt; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 31px;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">mensagem</span>

</td><td style="width: 195.7pt; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 31px;" width="261"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Mensagem de status de requisição</span>

</td></tr></tbody></table>

# Tabela de código (campos "código" e "mensagem" do retorno)

<table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" id="bkmrk-codigo-mensagem-1-ch" style="width: 563px; background: white; border-collapse: collapse;" width="623"><tbody><tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; height: 17.25pt;"><td style="width: 153px; border: 1pt solid black; background: rgb(221, 221, 221); padding: 0.75pt; height: 17.25pt;" width="183">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">codigo</span>**

</td><td style="width: 410.198px; border-top: 1pt solid black; border-right: 1pt solid black; border-bottom: 1pt solid black; border-image: initial; border-left: none; background: rgb(221, 221, 221); padding: 0.75pt; height: 17.25pt;" width="440">**<span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">mensagem</span>**

</td></tr><tr style="mso-yfti-irow: 1; height: 17.25pt;"><td style="width: 153px; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 17.25pt;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">1</span>

</td><td style="width: 410.198px; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 17.25pt;" width="440"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Chamada incompleta</span>

</td></tr><tr style="mso-yfti-irow: 2; height: 22.8pt;"><td style="width: 153px; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 22.8pt;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">2</span>

</td><td style="width: 410.198px; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 22.8pt;" width="440"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">Usuário e/ou senha inválidos</span>

</td></tr><tr style="mso-yfti-irow: 3; height: 17.25pt;"><td style="width: 153px; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 17.25pt;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">200</span>

</td><td style="width: 410.198px; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 17.25pt;" width="440"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">OK</span>

</td></tr><tr style="mso-yfti-irow: 4; mso-yfti-lastrow: yes; height: 25.0pt;"><td style="width: 153px; border-right: 1pt solid black; border-bottom: 1pt solid black; border-left: 1pt solid black; border-image: initial; border-top: none; padding: 0.75pt; height: 25pt;" width="183"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">999</span>

</td><td style="width: 410.198px; border-top: none; border-left: none; border-bottom: 1pt solid black; border-right: 1pt solid black; padding: 0.75pt; height: 25pt;" width="440"><span style="font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-color-alt: windowtext;">A operação não pode ser concluída. Contate os administradores</span>

</td></tr></tbody></table>

# Exemplo de chamada

&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:wsd="http://schemas.datacontract.org/2004/07/WSDFe.chamada"&gt;  
 &lt;soapenv:Header/&gt;  
 &lt;soapenv:Body&gt;  
 &lt;tem:GerarDanfeDactePorXml&gt;  
 &lt;tem:gerarDanfeDacteModel&gt;  
 &lt;wsd:usuario&gt;usuário&lt;/wsd:usuario&gt;  
 &lt;wsd:senha&gt;senha&lt;/wsd:senha&gt;  
 &lt;wsd:xml&gt;&lt;!\[CDATA\[conteúdo do XML\]\]&gt;&lt;/wsd:xml&gt;  
 &lt;wsd:modelo&gt;57&lt;/wsd:modelo&gt;  
 &lt;/tem:gerarDanfeDacteModel&gt;  
 &lt;/tem:GerarDanfeDactePorXml&gt;  
 &lt;/soapenv:Body&gt;  
&lt;/soapenv:Envelope&gt;

# Exemplo de retorno

&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;  
 &lt;s:Body&gt;  
 &lt;GerarDanfeDactePorXmlResponse xmlns="http://tempuri.org/"&gt;  
 &lt;GerarDanfeDactePorXmlResult xmlns:a="http://schemas.datacontract.org/2004/07/WSDFe.retorno" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;  
 &lt;a:arquivo&gt;  
 &lt;a:Nome&gt;57\_3981594b-ec4c-41eb-b396-b6a66858ac41.pdf&lt;/a:Nome&gt;  
 &lt;a:ArquivoBase64String&gt;conteúdo do DACTE&lt;/a:ArquivoBase64String&gt;  
 &lt;/a:arquivo&gt;  
 &lt;a:statusGeral&gt;  
 &lt;a:codigo&gt;200&lt;/a:codigo&gt;  
 &lt;a:mensagem&gt;OK&lt;/a:mensagem&gt;  
 &lt;/a:statusGeral&gt;  
 &lt;/GerarDanfeDactePorXmlResult&gt;  
 &lt;/GerarDanfeDactePorXmlResponse&gt;  
 &lt;/s:Body&gt;  
&lt;/s:Envelope&gt;