Created
July 3, 2017 20:43
-
-
Save s1037989/6034496e5fb766528801abf2a9674f45 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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