lemonldap-ng/lemonldap-ng-portal/example/soaptest.pl

29 lines
741 B
Perl
Raw Normal View History

#!/usr/bin/perl
#==============================================================================
#
# Simple script to test LemonLDAP::NG SOAP services
#
#==============================================================================
use strict;
use SOAP::Lite;
use Data::Dumper;
# Session ID (first parameter)
my $session_id = shift @ARGV;
# Service
2010-09-29 08:28:15 +02:00
my $soap =
SOAP::Lite->new( proxy => 'http://auth.example.com/index.pl/sessions' );
$soap->default_ns('urn:Lemonldap/NG/Common/CGI/SOAPService');
# Call some SOAP methods
2010-09-29 08:28:15 +02:00
my $attributes = $soap->call( 'getAttributes', $session_id )->result();
print Dumper $attributes;
2010-09-29 08:28:15 +02:00
my $applications = $soap->call( 'getMenuApplications', $session_id )->result();
print Dumper $applications;
exit;