prototype, not working on sl4 due to SSL
authorAleš Křenek <ljocha@ics.muni.cz>
Thu, 18 Dec 2008 09:07:13 +0000 (09:07 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Thu, 18 Dec 2008 09:07:13 +0000 (09:07 +0000)
org.glite.lb.ws-test/examples/ws_getversion.pl [new file with mode: 0755]

diff --git a/org.glite.lb.ws-test/examples/ws_getversion.pl b/org.glite.lb.ws-test/examples/ws_getversion.pl
new file mode 100755 (executable)
index 0000000..7b8604f
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use SOAP::Lite; # +trace; 
+use Data::Dumper;
+
+$ENV{HTTPS_CA_DIR}='/etc/grid-security/certificates';
+$ENV{HTTPS_VERSION}='3';
+
+$ENV{HTTPS_CA_FILE}= $ENV{HTTPS_CERT_FILE} = $ENV{HTTPS_KEY_FILE} =
+       $ENV{X509_USER_PROXY} ? $ENV{X509_USER_PROXY} : "/tmp/x509up_u$<";
+
+
+$srv = shift;
+
+$c = SOAP::Lite
+       -> proxy("$srv/lb")
+       -> uri('http://glite.org/wsdl/services/lb');
+
+# TODO: replace with $srv/lb/?wsdl once it works
+service $c 'http://egee.cesnet.cz/en/WSDL/HEAD/LB.wsdl';
+ns $c 'http://glite.org/wsdl/elements/lb';
+
+on_fault $c sub { print Dumper($_[1]->fault); $fault = 1; };
+
+$resp = uuGetVersion $c;
+
+print Dumper($resp);
+