Page 1 of 1

Documentos de Transporte Portugal y MSXML2.XMLHTTP

Posted: Tue Jul 27, 2021 5:51 pm
by fgondi
Buenas tardes,

Estoy intentando conectar con el webservice del Portal de finanças de Portugal, para el envío de documentos de transporte.

Y no consigo averiguar como establecer la comunicación.
No veo como enviar el certificado.

Code: Select all

oHttp := CreateObject( "MSXML2.XMLHTTP" )
oHttp:Open( "POST", "https://servicos.portaldasfinancas.gov.pt/sgdtws/documentosTransporte/", .F. )
oHttp:SetRequestHeader("Content-Type" ,"text/xml;charset=UTF-8" )
oHttp:Send( cXml )

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
 <S:Header>
  <wss:Security xmlns:wss="http://schemas.xmlsoap.org/ws/2002/12/secext">
   <wss:UsernameToken>
    <wss:Username>770011055/1</wss:Username>
    <wss:Password>U2FsdGVkX19C08kTIChAGzoDiFgZxsunTpBdU96c8fl/XQSqTdnuA1PVW6R2FyID</wss:Password>
    <wss:Nonce>Auwkw0i3ndvJRG55YR5TbYnKp02BDoNJ/v+5YANfB4VS9qEEBxaOMXCRrx4I+08B
zy4jwJPHrDXnqQaRuNCXEUKNCnfLDVNJ5V0Pehm0tqAvT4cDvYSGRVZnd6dMOtfo
fBNSr3GTBfdSoLAoB1qf9SLtbBG/3cVrr6yOQtNKBGpCXruIKJFLVcBOWIRZbdgr
XFub3kK9HuGIMCujnhVpU1zOObkwK04k5Fpp9SXah5Ymyva6XKn/Oc5cva+5ZZ1d
+XuBBs/x02qQHj4M/yMrOti6+djba5ynr3yKXOr95o9Xm+Wl8ZeSoKi6CNFNnV6P
cSluU29ztsU3I/XSQaxK2A==</wss:Nonce>
    <wss:Created>U2FsdGVkX1/uZCMMWZYhdo3mkoFX1uVPY7MveUWYDFPfjezGLxrE+vzZH7Okb7Fa</wss:Created>
   </wss:UsernameToken>
  </wss:Security>
 </S:Header>
 <S:Body>
  <ns2:envioDocumentoTransporteRequestElem xmlns:ns2="https://servicos.portaldasfinancas.gov.pt/sgdtws/documentosTransporte/">
  .....
  </ns2:envioDocumentoTransporteRequestElem>
 </S:Body>
</S:Envelope>