[ifmapdev] Perl new session example script.

55 views
Skip to first unread message

Terry Simons

unread,
May 16, 2010, 6:07:23 AM5/16/10
to ifmapdev
After much wrangling I've managed to get a simple Perl script working
that can create a new session with omapd.

Hopefully we can get the WSDL interfaces working with auto dispatch
because that is a lot nicer to work with, but this will at least get
people started who'd like to use Perl.

#!/usr/bin/perl
use strict;
use warnings;
use SOAP::Lite
# For debugging
+trace=>'all';

my $soap = SOAP::Lite
->readable(1)
->proxy("https://127.0.0.1:8081");

my $serializer = $soap->serializer();

$serializer->register_ns('http://www.trustedcomputinggroup.org/2006/
IFMAP/1', 'ns1');

my $newSession = SOAP::Data->name("ns1:new-session");

my $soapReply = $soap->call($newSession);

my $sessionId = $soapReply->valueof('//session-id');

print("Session ID: $sessionId\n");
Reply all
Reply to author
Forward
0 new messages