Skip to content

Instantly share code, notes, and snippets.

@s1037989
Created July 3, 2017 20:43
Show Gist options
  • Save s1037989/6034496e5fb766528801abf2a9674f45 to your computer and use it in GitHub Desktop.
Save s1037989/6034496e5fb766528801abf2a9674f45 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl -w
# This script calls the SOAP method " DeviceAssetInfoExport" on an N-central server.
# The data structure returned is printed to stdout using Data::Dumper.
use strict;
use SOAP::Lite;
use Data::Dumper;
my $NableServer = SOAP::Lite ->uri("http://server.nable.com/")
->proxy("https://.../dms/services/ServerEI?wsdl");
my $functionName = " DeviceAssetInfoExport";
my $result = $NableServer->$functionName(
SOAP::Data->name('Version' => SOAP::Data->type(string=>"1.0")),
SOAP::Data->name('Username' => '...'),
SOAP::Data->name('Password' => "...")
);
unless ($result->fault) {
my $deviceDataArray = $result->result();
print Dumper($deviceDataArray) , "\n";
} else {
print "Call returned fault\n";
print $result->faultstring . "\n";
exit 1;
}
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment