Omar Rodriguez

Omar Rodriguez

  • 735
  • 1.2k
  • 111.1k

How insert security in SOAP request?

Jul 19 2019 3:35 PM
Hello, I have a trouble here
 
I need to make a httprequest from
https://ose-test.com/ol-ti-itcpe/billService
 
I need to do an HttpRequest but I don't know how to add security in the header. the xml for the post would be this (work tested in ReadiApi 2.7)
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.sunat.gob.pe">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="XWSSGID-15500684644941071336428" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>someuser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">somepassword</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ser:getStatusCdr>
<rucComprobante>20257354040</rucComprobante>
<tipoComprobante>01</tipoComprobante>
<serieComprobante>F001</serieComprobante>
<numeroComprobante>1520</numeroComprobante>
</ser:getStatusCdr>
</soapenv:Body>
</soapenv:Envelope>

Answers (3)