(imported topic written by SystemAdmin)
See my last post , Javascript example doesn’t work, So I tried the perl example script in R1.
So far, SOAP scripting with Bigfix is still no luck.
- here is my version of simple test script, it ended with error on Fedora14-32 OS.
root@t-fedora14-32 bigfix
./bf.pl mypassword
proxy: transport protocol not specified
root@t-fedora14-32 bigfix
cat ./bf.pl
#! /usr/bin/perl
use SOAP::Lite;
#arguments:
password
my $host = “bfxreports.test.com”;
my $name = “addomain\account”;
my $pass = $ARGV[0];
my $RL = “number of bes computers”;
my $username = SOAP::Data->name(‘username’ => $name );
my $password = SOAP::Data->name(‘password’ => $ARGV[0] );
my $expr = SOAP::Data->name(‘relevanceExpr’ => $RL );
my $service = SOAP::Lite -> uri( ‘http://’ . $host . ‘/webreports?wsdl’ ) -> proxy( $host );
#my $service = SOAP::Lite -> uri( ‘http://’ . $host . ‘/webreports?wsdl’ ) ;
my $result = $service -> GetRelevanceResult( $expr, $username, $password );
if( $result->fault )
{
print "faultcode: " . $result->faultcode . “\n”;
print "faultstring: " . $result->faultstring . “\n”;
}
else {
foreach my $answer ( $result->valueof( “//GetRelevanceResultResponse/a” ) )
{
print $answer . “\n”;
}
}
root@t-fedora14-32 bigfix
- Here is the perl and SOAP::Lite version info.
root@fl36t-fedora14-32 bigfix
rpm -qa perl-SOAP-Lite
perl-SOAP-Lite-0.711-1.fc14.noarch
root@fl36t-fedora14-32 bigfix
perl -v
This is perl 5, version 12, subversion 3 (v5.12.3) built for i386-linux-thread-multi
Copyright 1987-2010, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using “man perl” or “perldoc perl”. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
root@fl36t-fedora14-32 bigfix
R1: http://support.bigfix.com/product/documents/BigFix_Web_Reports_80_100810.pdf