Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var soap = require('soap');
- var url = 'your WSDL url';
- var auth = "Basic " + new Buffer("your username" + ":" + "your password").toString("base64");
- soap.createClient(url, { wsdl_headers: {Authorization: auth} }, function(err, client) {
- });
- var soap = require('soap');
- var url = 'AXLAPI.wsdl'; // Download this file and xsd files from cucm admin page
- var auth = "Basic " + new Buffer("your username" + ":" + "your password").toString("base64");
- soap.createClient(url,function(err,client){
- client.addHttpHeader('Authorization',auth);
- });
- var soap = require('soap');
- var url = 'your WSDL url';
- soap.createClient(url, function(err, client) {
- client.setSecurity(new soap.BasicAuthSecurity('your username','your password'));
- });
- var auth = "Basic " + new Buffer('username' + ':' + 'password').toString("base64");
- var client = Soap.createClient('wsdlUrl', { wsdl_headers: { Authorization: auth } }, (err, client) => {
- if (err) {
- throw err;
- } else {
- client.yourMethod();
- }
- });
- const security = new soap.BasicAuthSecurity(username, password);
- const wsdl_headers = {};
- security.addHeaders(wsdl_headers);
- soap.createClientAsync(url, { wsdl_headers }).then((err, client) => {
- client.setSecurity(security);
- // etc.
- });
- const security = new soap.NTLMSecurity(username, password, domain, workstation);
- const wsdl_headers = {}, wsdl_options = {};
- security.addHeaders(wsdl_headers);
- security.addOptions(wsdl_options);
- soap.createClientAsync(url, { wsdl_headers, wsdl_options }).then((err, client) => {
- client.setSecurity(security);
- // etc.
- });
- I am getting this error:
- Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames
- Here's my code:
- var soap = require('soap');
- var url = 'your WSDL url';
- var auth = "Basic " + new Buffer("your username" + ":" + "your password").toString("base64");
- soap.createClient(url, { wsdl_headers: {Authorization: auth} }, function(err, client) {
- client.setSecurity(new soap.BasicAuthSecurity('your username','your password'));
- client.yourfunction(args, function (err, result) {
- if (err) {
- console.log('Error: ', err);
- }
- else {
- console.log('Result: ', result);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement