Created
July 20, 2018 22:32
-
-
Save jason-dark/20d53066b9d5f8f317c3ba76a49eff5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soap = require('soap'); | |
var url = '/home/user/your-project/xmlfaz.wsdl'; | |
var args = { | |
_xml: | |
'<r20:searchFazLog>' + | |
'<servicePass>' + | |
'<userID>apiuser@domain.com</userID>' + | |
'<password>apiuserpassword</password>' + | |
'</servicePass>' + | |
'<adom>root</adom>' + | |
'<content>logs</content>' + | |
'<format>0</format>' + | |
'<deviceName>aDeviceToQuery</deviceName>' + | |
'<logType>4</logType>' + | |
'<maxNumMatches>1000</maxNumMatches>' + | |
'<startIndex>1</startIndex>' + | |
'<checkArchive>0</checkArchive>' + | |
'<compression>gzip</compression>' + | |
'<searchCriteria>user=naughtyuser@domain.com action=blocked</searchCriteria>' + | |
'</r20:searchFazLog>' | |
}; | |
soap.createClient(url, function (err, client) { | |
if (err) console.error(err); | |
client.searchFazLog(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