hi !
how can we test your pearl example under windows plateform ?
Printable View
Do you have example of using ZimbraSession.pm to create accounts ?
No. I have the information account in a mysql DataBase!!
Hi! it realy works!!
but i have a question, i wanna create an appointment like admin, i mean, i wanna create appointments in other zimbra account.
Thanks in advance
Hi,
I've installed ZCS 7.1.4 and I'm trying to use the perl modules to perform admin actions over the SOAP interface, no luck so far.
Everything runs but it seems the perl client running on the host does not trust the host's own self-issued SSL certificate.
The output I see is:
strace tells me perl is using /opt/zimbra/zimbramon/lib/Mozilla/CA/cacert.pem whilst verifying the certificate.Code:$ perl ./getacct.pl admin
RESPONSE:
Can't connect to localhost:7071 (certificate verify failed)
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown errorerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at /opt/zimbra/zimbramon/lib/LWP/Protocol/http.pm line 51.
Error Handling Soap Response
not well-formed (invalid token) at line 1, column 3, byte 3 at /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/XML/Parser.pm line 187
Has the default verification become more strict since the pm were written, or am I missing some step that allows the client to trust the server's own self-issued certificate?
TIA,
-Cam
I got a bit further:
PERL_LWP_SSL_VERIFY_HOSTNAME=0
disables the checking, so the client is OK with the self-signed certificate. The perl script could be updated to set this in the environment.
I've since found the ZimbraCSharpClient and I'm looking at that now.
We've been having trouble with Zimbra 7. Does anyone else does Perl SOAP calls for account provisioning/deprovisioning?
With Zimbra 7, we seem to have a problem when a request succeeds. We get a corrupted XML like: '_content' => '<',
However, if the request fails, (ie trying to create an account that already exists), we get a proper XML.
Does anyone else uses Perl for account administration? TIA.
To see if it works or not, I did CreateAccountRequest, and it worked for me.
I based my script on a fixed getacct.pl, where I had to check
find_child('sessionId')
had not returned undef, before I accessed ->content on it.
If in doubt, try the equivalent operation using zmprov -d and compare the XML to find out what's different.
-Cam
Hello,
I've got a problem with ZimbraSession.pm. When I try to initialize a new zimbra session, i've got this error :
In the code, this is the following line:Quote:
Can't call method "content" on an undefined value at /usr/local/src/Zimbra//ZimbraSession.pm line 64.
my $sessionId = $authResponse->find_child('sessionId')->content;
I've tried to display authResponse informations :
And this is the call of the function :Quote:
$VAR1 = bless( {
'ns' => 'urn:zimbraAccount',
'attrs' => {},
'name' => 'AuthResponse',
'children' => [
bless( {
'ns' => 'urn:zimbraAccount',
'attrs' => {},
'content' => '0_de8b59d4abdf8f60920c3c31c0338f595f43492a_69643d 33363a32613939653534662d626364612d343561372d616434 612d3339656333376663326133313b6578703d31333a313334 333339393330393037333b76763d313a303b747970653d363a 7a696d6272613b',
'name' => 'authToken',
'children' => []
}, 'XmlElement' ),
bless( {
'ns' => 'urn:zimbraAccount',
'attrs' => {},
'content' => '172799999',
'name' => 'lifetime',
'children' => []
}, 'XmlElement' ),
bless( {
'ns' => 'urn:zimbraAccount',
'attrs' => {},
'content' => 'carbon',
'name' => 'skin',
'children' => []
}, 'XmlElement' )
]
}, 'XmlElement' );
The url format http://XXX.XXX.XXX.XXX/service/soap/ is right ? can't use https://XX.XX.XX.XX:7071 ?Quote:
my $zs = ZimbraSession->new(
{name => 'test', login => 'test@cloud.com'},
'testtest',
'http://XXX.XXX.XXX.XXX/service/soap/',
# {acctns => '', mailns => ''}
);
I've you got a example of session initialisation ?
Thank you for your help, for information i'm working under zcs open source 7.2
Hello,
I'm using the API and it woks for me but i'd like to read my message, what do i have to change please?
Thanks in advance.