Saltar al contenido principal

Método: ObtenerXml

Retorna XML de documento específico.

Parámetros

NombreTipoObligatorio
sistemaString
rutString
usuarioString
claveString (codificado en base64)
tipo_dteInteger
folioInteger

¿Cómo consumir?

El XML de entrada sería algo como:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cls="http://cls.DTEIntegrado/">
<soapenv:Header/>
<soapenv:Body>
<cls:ObtenerXML>
<sistema>erpfull</sistema>
<rut>24232221-5</rut>
<usuario>integrado_erpfull</usuario>
<clave>ZXJwZnVsbDIwMjE=</clave>
<tipo_dte>33</tipo_dte>
<folio>2266</folio>
</cls:ObtenerXML>
</soapenv:Body>
</soapenv:Envelope>
curl --request POST \
--header 'Content-Type: text/xml;charset=UTF-8' \
--data '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cls="http://cls.DTEIntegrado/"><soapenv:Header/><soapenv:Body><cls:ObtenerXML><sistema>erpfull</sistema><rut>24232221-5</rut><usuario>integrado_erpfull</usuario><clave>ZXJwZnVsbDIwMjE=</clave><tipo_dte>33</tipo_dte><folio>2266</folio></cls:ObtenerXML></soapenv:Body></soapenv:Envelope>' \
https://hades.dtemite.cl/WSDTEIntegrado/WSDTEInt

¿Qué me devuelve?

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:ObtenerXMLResponse xmlns:ns2="http://cls.DTEIntegrado/">
<return>
<resultado>true</resultado>
<sRetorno><![CDATA[<Resultado><Folio>2266</Folio><TipoDTE>33</TipoDTE><XML>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iSVNPLTg4NTktMSI/Pgo8RW52aW9EVEUgeG1s....0YT48L0tleUluZm8+PC9TaWduYXR1cmU+PC9FbnZpb0RURT4=</XML></Resultado>]]></sRetorno>
</return>
</ns2:ObtenerXMLResponse>
</S:Body>
</S:Envelope>