Fix SOAP configuration bug (#230), and add a test script

This commit is contained in:
Clément Oudot 2010-11-04 14:52:17 +00:00
parent 469c7c34cd
commit c800c90232
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,25 @@
#!/usr/bin/perl
#==============================================================================
#
# Simple script to test LemonLDAP::NG SOAP configuration service
#
#==============================================================================
use strict;
use SOAP::Lite;
use Data::Dumper;
# Service
my $soap =
SOAP::Lite->new( proxy => 'http://auth.example.com/index.pl/config' );
$soap->default_ns('urn:Lemonldap/NG/Common/CGI/SOAPService');
# Call SOAP methods
my $lastCfg = $soap->call( 'lastCfg' )->result();
print "Last configuration:\n". Dumper $lastCfg;
my $config = $soap->call( 'getConfig' )->result();
print "Configuration data:\n". Dumper $config;
exit;

View File

@ -170,7 +170,7 @@ sub setAttributes {
# @return hashref serialized in SOAP by SOAP::Lite
sub getConfig {
my $self = shift;
my $conf = $self->_getLmConf() or die("No configuration available");
my $conf = $self->{lmConf}->getConf() or die("No configuration available");
return $conf;
}