• File: soap.js
  • Full Path: /var/www/nodejs/callDir/soap.js
  • Date Modified: 06/03/2024 8:17 PM
  • File size: 805 bytes
  • MIME-type: text/plain
  • Charset: utf-8
const soap = require('soap');

// WSDL URL
const url = 'https://agenda.tvcabo.co.mz:90/BeOnServices/TVCabo/BillinggateQT/Billinggate.asmx?WSDL';
//const url = "https://api.tvcabo.mz/BeOnServices/TVCabo/BillinggateQT/Billinggate.asmx??WSDL";
// Create the client
soap.createClient(url, function(err, client) {
    if (err) {
        console.error('Error creating client:', err);
        return;
    }
    
    // Define the arguments
    const args = {
        NContrato:01709864784
    };

console.log(client.ClientePrevFact)
//    return;
    // Make the request
    client.ClientePrevFact(args, function(err, result) {
        //if (err) {
          //  console.error('Error making SOAP request:', err);
            //return;
        //}
        
        console.log('SOAP response:', err);
    });
});