Ambiente Homologação
POST /atende.php?pg=rest&service=WNERestServiceNFSe&cidade=migra_pinhais HTTP/1.1
Host: treinamento.atende.net
Authorization: Basic MDkyNDczNDMwMDAxMjA6SXBtQDIwMjE=
Cookie: PHPSESSID=7pf56uromi3p4vnrj64mi264a1; cidade=migra_pinhais
Content-Length: 222
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="XML"; filename="/E:/JOBs/NFSe/xml_teste/S_NS9_000000001-nfSe.xml"
Content-Type: text/xml
(data)
----WebKitFormBoundary7MA4YWxkTrZu0gW
cFile := "E:\JOBs\NFSe\xml_teste\S_NS9_000000001-nfSe.xml"
doc := CreateObject( "MSXML2.DOMDocument" )
oHTTP := CreateObject( "MSXML2.XMLHTTP" )
oHTTP:Open( "POST" , cUrl, .f. )
oHTTP:SetRequestHeader( "Content-Type" , "text/xml" )
oHTTP:SetRequestHeader( "Authorization" , "Basic " + cBasic )
oHTTP:SetRequestHeader( "Content-Type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" )
oHTTP:SetRequestHeader( "Content-Disposition", 'form-data; name="XML"; filename=' + cFile )
http:Send()
Estou obtendo o seguinte retorno:
<?xml version="1.0" encoding="ISO-8859-1"?>
<retorno>
<mensagem>
<codigo>9999 - Arquivo XML da Nota Fiscal de Servi?Eletr?a n?enviado!</codigo>
</mensagem>
</retorno>