Fix SOAP configuration bug (#230), and add a test script
This commit is contained in:
parent
469c7c34cd
commit
c800c90232
25
modules/lemonldap-ng-portal/example/soapconfigtest.pl
Executable file
25
modules/lemonldap-ng-portal/example/soapconfigtest.pl
Executable 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;
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user