Skip to content

Instantly share code, notes, and snippets.

@jason-dark
Last active July 20, 2018 22:29
Show Gist options
  • Save jason-dark/a18bdeff50369e9f3b9c151c1644f146 to your computer and use it in GitHub Desktop.
Save jason-dark/a18bdeff50369e9f3b9c151c1644f146 to your computer and use it in GitHub Desktop.
‍var soap = require('soap');
var url = '/home/user/your-project/xmlfaz.wsdl';
var args = {
_xml:
'<r20:getDeviceList>' +
'<servicePass>' +
'<userID>apiuser@domain.com</userID>' +
'<password>apiuserpassword</password>' +
'</servicePass>' +
'<adom>root</adom>' +
'<detail>true</detail>' +
'</r20:getDeviceList>'
};
soap.createClient(url, function (err, client) {
if (err) console.error(err);
client.getDeviceList(args, function (err, result) {
if (err) console.error(err);
console.log(result); // Print the result
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment