Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- #use strict;
- use SOAP::Lite;
- # site variables (edit these)
- my $server = '<host address/name>:7878';
- my $username = 'user';
- my $password = 'password';
- # end of site variables
- my $link = SOAP::Lite
- -> uri('urn:TC')
- -> proxy("http://$username:$password\@$server/");
- if ($#ARGV == -1) {
- print "worldserver command not provided\n\n";
- exit;
- }
- if ($#ARGV == 0) {
- $command = $ARGV[0];
- } else {
- for (my $l=0; $l <= $#ARGV; $l++) {
- $command .= $ARGV[$l];
- if ($l != $#ARGV) {
- $command .= " ";
- }
- }
- }
- my $results = $link->executeCommand(SOAP::Data->name('command')->value("$command"));
- # error trap - untested, so commented out
- #die $link->fault->{ faultstring } if ($link->fault);
- print $results->result, "\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement