querying Tivoli Workload Scheduler 8.5 (tws) using web services

October 1st, 2010

Pubblico un esempio di client per l’interrogazione di tws mediante web services utilizzando perl…

#!/bin/perl

#ppm install SOAP::Lite
#ppm install Crypt::SSLeay

use SOAP::Lite
#trace=>’all’
;

#use SOAP::Lite +trace => [qw(method fault headers result debug)];

my $username = ‘user’;
my $password = ‘pass’;
my $host     = ‘host’;

sub SOAP::Transport::HTTP::Client::get_basic_credentials {
return $username => $password;
}

$wsdl = “https://$host:31116/PlanServicesWeb/services/SchedulingFactory/wsdl/SchedulingFactory.wsdl”;

#$service = “https://$host:31116/PlanServicesWeb/services/JobStreamService”;
#$service = “https://$host:31116/PlanServicesWeb/services/JobService”;

$service = “https://$host:31116/PlanServicesWeb/services/SchedulingFactory”;

$ns1 = “http://services.ws.tws.ibm.com/TWS-Scheduling”;
$ns2 = “http://types.ws.tws.ibm.com/TWS-Types”;

my $soap = SOAP::Lite->new( proxy => $service );
$soap->readable(1);
$soap->ns($ns2,’ns2′);
$soap->ns($ns1,’ns1′);

my $result=$soap->call(“queryJobs”,
SOAP::Data->name(“engineName” => undef )->prefix(ns1),
SOAP::Data->name(“filter” => \SOAP::Data->value(
SOAP::Data->name(“details”)->prefix(ns2),
SOAP::Data->name(“minimum”)->prefix(ns2),
SOAP::Data->name(“maximum”)->prefix(ns2),
SOAP::Data->name(“dataType”=>”WORKSTATION_NAME”)->prefix(ns2),
SOAP::Data->name(“value”=> \SOAP::Data->value(
SOAP::Data->name(string=>”WK17″)->prefix(“xsd”),
),
)->prefix(ns2),

SOAP::Data->name(“dataType”=>”JOB_STREAM_NAME”)->prefix(ns2),
SOAP::Data->name(“value”=> \SOAP::Data->value(
SOAP::Data->name(string=>”IGS*”)->prefix(“xsd”),
),
)->prefix(ns2),
),
)->prefix(ns1)->type(“ns2:FilterCriteria”),

);

die $result->faultstring if ($result->fault);

#use Data::Dumper qw(Dumper);
#print Dumper ($result);

foreach my $a ($result->valueof(“//queryJobsResponse/queryJobsReturn/JobInstance”)) {
print sprintf “%-11s %-16s %-16s %-16s %-16s %-5s\n”, $a->{workstationName},
$a->{jobName},
$a->{jobStreamName},
$a->{startTime},
$a->{actualEnd},
$a->{internalStatus};
}

exit;

Modifica scheda di rete su Inetbox 300s

November 2nd, 2009

Ora la rete va che è una scheggia….
02112009094.jpg02112009091.jpg
dm500_mods_rgb_network_fix.pdf
lan_dm500.pdf

Windows nuovo (Vista), errore nuovo

April 3rd, 2008

immagine.jpg

No me pareva de gaver instaea uindous in cinese!

Il compagno di scrivania di Michele!

June 1st, 2007
ven 01/06/2007 14:38 01062007023

Vi presento Bananito, il nuovo compagno di scrivania di Michele!

Ecco il risultato finale

May 20th, 2007

dom 20/05/2007 15:57 20052007010

Niente da dire, come nuova!

Aiutooo l’interruttore della macchina da cucire si è rotto…

May 20th, 2007

dom 20/05/2007 15:57 20052007009

Riparazione della macchina da cucire della nonna terminata!

Hello world!

May 20th, 2007

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!