NAME
ZimbraManager::SOAP
VERSION
version 0.15
SYNOPSIS
use ZimbraManager::SOAP;
has 'soap' => sub {
my $self = shift;
return ZimbraManager::SOAP->new(
log => $self->log,
mode => 'full' # or 'admin' or 'user'
# soapDebug => '1', # enables SOAP backend communication debugging
# soapErrorsToConsumer => '1' # returns SOAP error to consumer
);
};
my $namedParameters = {
action => 'FUNCTIONNAME',
args => \%DATASTRUCTUREDPARAMS,
authToken => $authToken,
};
my ($ret, $err) = $self->soap->call($namedParameters);
also $self->soap->call( action => 'FUNCTIONNAME', args => \%DATASTRUCTUREDPARAMS, authToken => $authToken, );
is valid
DESCRIPTION
Helper class for Zimbra adminstration interface.
NAME
ZimbraManager::SOAP - class to manage Zimbra with perl and SOAP
ATTRIBUTES
Logging and Debugging Attributes
log
The mojo log object
soapDebug
Enabled SOAP debug output to $self->log
soapErrorsToConsumer
Returns soapErrors to the consumer in the return messages
mode
The zimbra SOAP interface has three modes:
admin: adminstration access and commands in admin context
user: user accesses and commands in user context
full: both admin and user
wsdlPath
Path to WSDL and XML Schema file(s)
wsdlFile
Select WSDL file according to mode
wsdlXml
parsed WSDL as XML
wsdl
parsed WSDL as perl object with corresponding included XML Schema and function stubs.
zcsService
Internal WSDL name for selecting mode
wsdlReturnParameterName
Name of the return value / structure
In Zimbra 8.0.7 this will be 'params' as defined here:
<wsdl:definitions>
...
<wsdl:message name="AdminAbortHsmRequestMessage">
<wsdl:part name="params" element="zimbraAdmin:AbortHsmRequest"/>
</wsdl:message>
...
</wsdl:definitions>
In Zimbra 8.0.6 and previous versions this has been 'parameters' as defined here:
<wsdl:definitions>
...
<wsdl:message name="AdminAbortHsmRequestMessage">
<wsdl:part name="parameters" element="zimbraAdmin:AbortHsmRequest"/>
</wsdl:message>
...
</wsdl:definitions>
service
Processed SOAP service URI on the server
transporter
Transporter for the SOAP calls - we are using LWP and handle these parameters
- SSL VERIFY HOSTNAME (see IO::Socket::SSL)
- SSL VERIFY MODE (see IO::Socket::SSL)
- HTTP keep_alive
soapOps
All usable SOAP operations exported by the the SOAP interface and with the selected mode.
METHODS
All the methods of Mojo::Base plus:
call
Calls Zimbra with the given argument and returns the SOAP response as perl hash.
COPYRIGHT
Copyright (c) 2014 by Roman Plessl. All rights reserved.
LICENSE
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
AUTHOR
Roman Plessl <roman@plessl.info>
HISTORY
2014-03-20 rp Initial Version
2014-03-27 rp Improved Error and SSL Handling
2014-04-29 rp Improved API and Session Handing
AUTHOR
Roman Plessl <rplessl@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Roman Plessl.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007