Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: Perl Module to simplify SOAP access to Zimbra

  1. #11
    Join Date
    Jun 2009
    Posts
    93
    Rep Power
    6

    Default

    Quote Originally Posted by asteichmann View Post
    Anyway, try this. It has my most recent changes.
    hi !

    how can we test your pearl example under windows plateform ?

  2. #12
    Join Date
    Jun 2010
    Location
    FR
    Posts
    2
    Rep Power
    5

    Default

    Do you have example of using ZimbraSession.pm to create accounts ?

  3. #13
    Join Date
    Apr 2010
    Posts
    6
    Rep Power
    5

    Default

    No. I have the information account in a mysql DataBase!!

  4. #14
    Join Date
    Jul 2010
    Location
    Mexico
    Posts
    6
    Rep Power
    5

    Default

    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

  5. #15
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    3

    Default SSL issues using the perl modules

    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:

    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
    strace tells me perl is using /opt/zimbra/zimbramon/lib/Mozilla/CA/cacert.pem whilst verifying the certificate.

    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

  6. #16
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    3

    Default

    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.

  7. #17
    Join Date
    Dec 2006
    Posts
    184
    Rep Power
    8

    Default

    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.

  8. #18
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    3

    Default

    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

  9. #19
    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    3

    Default

    Hello,

    I've got a problem with ZimbraSession.pm. When I try to initialize a new zimbra session, i've got this error :

    Can't call method "content" on an undefined value at /usr/local/src/Zimbra//ZimbraSession.pm line 64.
    In the code, this is the following line:
    my $sessionId = $authResponse->find_child('sessionId')->content;

    I've tried to display authResponse informations :
    $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' );
    And this is the call of the function :
    my $zs = ZimbraSession->new(
    {name => 'test', login => 'test@cloud.com'},
    'testtest',
    'http://XXX.XXX.XXX.XXX/service/soap/',
    # {acctns => '', mailns => ''}
    );
    The url format http://XXX.XXX.XXX.XXX/service/soap/ is right ? can't use https://XX.XX.XX.XX:7071 ?

    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

  10. #20
    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    3

    Default

    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.

Similar Threads

  1. Can't start Zimbra!
    By zibra in forum Administrators
    Replies: 5
    Last Post: 03-22-2007, 12:34 PM
  2. dspam logrotate errors
    By michaeln in forum Users
    Replies: 7
    Last Post: 02-19-2007, 12:45 PM
  3. zimbra-core missing
    By kinaole in forum Developers
    Replies: 1
    Last Post: 10-02-2006, 12:59 PM
  4. Replies: 16
    Last Post: 09-07-2006, 07:39 AM
  5. port 7071 not listening OS X install
    By leeimber in forum Installation
    Replies: 7
    Last Post: 03-21-2006, 10:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •