Hi,
I am consuming SAP soap service from within nodejs using soap client. I tried the following code but got the 401 not authorized error. Can anyone help what is the mistake I am doing ? From SoapUI it is working fine with Basic Authentication. Here is my code:
const soap = require('soap');
const url = 'http://somedomain.com:8000/sap/bc/srt/rfc/sap/zint_customer_master_1/100/zint_customer_master_1/zint_customer_master_1';
const options = {
wsdl_header: {
'Authorization': 'Basic ' + Buffer.from('myuser:mypass').toString('base64')
}
}
soap.createClient(url, options, function (err, client) {
if (err) {
console.log(err)
} else {
console.log("Client established successfully")
}
});