beginner question on use of Frontier::Client
am 15.11.2006 16:52:01 von lvirdenI'm attempting to write one of my first perl programs. It is to
interact with an internal web service. I'm having something basic going
wrong:
use Frontier::Client ;
# Parameter:
# login_id
#
# Output:
# login_id of manager
my @supervisor_info;
$server = Frontier::Client->new('url' => 'http://server:port/' );
foreach my $empno (@ARGV) {
@supervisor_info = Frontier::Client->call('GetAllInfoByEmpNo',
$empno);
if ( $#supervisor_info != 0 ) {
print "found $empno\n";
} else {
print "Unable to locate supervisor for $empno\n";
} ;
}
As you can see, I'm not trying to do anything with the data yet - in
fact, not even looking at the data yet. Just trying to get the basic
skeleton working, so that I know, moving on, that the basics are
working.
Of course, I have a real server and port URL in the new call.
And the method name comes from the documentation that the web service
guys have provided.
The error I get is:
Can't use string ("Frontier::Client") as a HASH ref while "strict refs"
in use at /usr/local/perl5/lib/site_perl/5.8.4/Frontier/Client.pm line
53.
(where that is the path to the pm file).
I appear to be missing something obvious. Given that I have not written
many perl programs, it is probably something embarassingly simple.
I was wondering if anyone could provide me a kind nudge in the right
direction?
Thanks!