Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

Thread: [SOLVED] PHP Class for easy access to Zimbra SOAP API

  1. #21
    jputz12 is offline Member
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    5

    Default xmlparse

    Im having this error on the xmlparse.php

    any suggestions?

    XML error: Not well-formed (invalid token) at line 1

  2. #22
    Syruis is offline Project Contributor
    Join Date
    Oct 2008
    Location
    France
    Posts
    14
    Rep Power
    6

    Default

    May be you haven't the right settings...
    It must be the admin account!

    if it's not the problem, can you check your zimbra version and the xml output ?

    Regards,

  3. #23
    jputz12 is offline Member
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    5

    Default Sample Response: XML error: Not well-formed (invalid token) at line 1

    Here is the response I am trying to parse.

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><context xmlns="urn:zimbra"><change token="4589"/></context></soap:Header><soap:Body><GetQuotaUsageResponse more="1" searchTotal="16" xmlns="urn:zimbraAdmin"><account limit="0" id="****" name="*******" used="127728"/></GetQuotaUsageResponse></soap:Body></soap:Envelope>

    Thank you.

  4. #24
    pjsmith is offline Intermediate Member
    Join Date
    Oct 2007
    Posts
    16
    Rep Power
    7

    Default

    Hi,

    I was using the old class and got a problem after updating to zimbra 6. I found this new update (thanks!), and tried it, but actually still get the same error. I'm trying to use the 'zimbra_create_account' with my code which always worked just fine on the older versions of zimbra, but now with v6, my attempts to create an account are failing.

    If I check the response back from the zimbra server I get

    soap:Senderno valid authtoken presentservice.AUTH_REQUIREDbtpool0-43://z1.xxx.net:7071/service/admin/soap:1259838248635:4cef5c462e9067c7:SoapEngine272

    Are there any updates to get this class working with v6? I've seen similar errors quotes to do with misplaced tags meaning the token ID was not seen in the right place.

    Anyone have a fix?

    Thanks.

  5. #25
    canche_x is offline New Member
    Join Date
    Oct 2009
    Posts
    3
    Rep Power
    5

    Default

    Quote Originally Posted by Syruis View Post
    Code:
    public function zimbra_create_account($email,$password,$firstname,$lastname){
    	 	$sim = new simba;
    		$zim = $sim->_zimbra_login();//extends zimbra_login
    		$sim = null;
    		//DEFINITION DES ATTRIBUTS
    		$a = array('displayName'=>$firstname.' '.$lastname,'givenName'=>$firstname,'sn'=>$lastname,'zimbraMailCanonicalAddress'=>$email);
    
    		$val = $zim->zimbra_create_account($email,$password,$a);
    		
    		if ($val != false)
    			return $val; 
    		else
    			return array(0 => ' impossible account creation ');	 
    	 }
    I would like to know which are exactly the ATTRIBUTES that can be passed through the array variable?

    I need some attributes like the account quota or another

    Regards

    EDIT: I already discovered how attributes can be send to the server xD.

    Just looking into the response you can see the name of the parameters that can be send.

    For Example the account quota is named "zimbraMailQuota".

    Regards
    Last edited by canche_x; 12-04-2009 at 03:21 PM.

  6. #26
    canche_x is offline New Member
    Join Date
    Oct 2009
    Posts
    3
    Rep Power
    5

    Default

    Quote Originally Posted by pjsmith View Post
    Hi,

    I was using the old class and got a problem after updating to zimbra 6. I found this new update (thanks!), and tried it, but actually still get the same error. I'm trying to use the 'zimbra_create_account' with my code which always worked just fine on the older versions of zimbra, but now with v6, my attempts to create an account are failing.

    If I check the response back from the zimbra server I get

    soap:Senderno valid authtoken presentservice.AUTH_REQUIREDbtpool0-43://z1.xxx.net:7071/service/admin/soap:1259838248635:4cef5c462e9067c7:SoapEngine272

    Are there any updates to get this class working with v6? I've seen similar errors quotes to do with misplaced tags meaning the token ID was not seen in the right place.

    Anyone have a fix?

    Thanks.
    Hi, I did this changes and it works for me:

    Edit the function set_zimbra_header() and change the code:

    Code:
    <soap:Header> 
    	  <context xmlns="urn:zimbra"'; 
    		if ($this->zimbra_session != 0) 
    			$this->soapheader .= '> 
    		    <authToken>' . $this->zimbra_auth . '</authToken> 
    		    <sessionId id="' . $this->zimbra_session . '">' . $this->zimbra_session . '</sessionId> 
    		  </context>'; 
    		else 
    			$this->soapheader .= '/>'; 
    		$this->soapheader .= ' 
    </soap:Header>
    to this:
    Code:
    <soap:Header> 
    	  <context xmlns="urn:zimbra"'; 
    		if ($this->zimbra_session != 0) 
    			$this->soapheader .= '> 
    		    <authToken>' . $this->zimbra_auth . '</authToken> 
    		    <sessionId id="' . $this->zimbra_session . '">' . $this->zimbra_session . '</sessionId> 
    		  </context>'; 
    		else 
    			//$this->soapheader .= '/>';
    			  $this->soapheader .= '> 
    			  <session/> 
    			  </context>'; 
    		$this->soapheader .= ' 
    </soap:Header>
    next we edit the function zimbra_login() and change:

    Code:
    $this->zimbra_session = $x['SESSIONID']['DATA'];
    to:

    Code:
    $this->zimbra_session = $x['SESSION']['DATA'];
    After this it worked for me

    Regards

  7. #27
    uducat is offline Starter Member
    Join Date
    Dec 2009
    Posts
    1
    Rep Power
    5

    Default

    Wow, just tested the class and it seems to work great! Saved me alot of work, thanks

  8. #28
    pjsmith is offline Intermediate Member
    Join Date
    Oct 2007
    Posts
    16
    Rep Power
    7

    Default

    Just spotted your reply. This does seem to work. Thanks very much for sharing your fix.

  9. #29
    Michael REMY is offline Loyal Member
    Join Date
    Jun 2009
    Posts
    93
    Rep Power
    6

    Default

    Quote Originally Posted by Ron Gage View Post
    Greetings:

    I am writing a PHP class for accessing the Zimbra SOAP API. While not complete yet, it does have most of the important functions working. Current functions include multiple account and domain manipulation functions.

    If you would like to check this out, it may be downloaded from ftp://ftp.rongage.org/pub/zimbraAdmin

    If anyone has any questions, please don't hesitate to ask!

    Ron Gage
    the ftp server is down. Shall you help me to find his project/class ?

    best regards,

    Mike

  10. #30
    maxxer's Avatar
    maxxer is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Lecco, Italy
    Posts
    552
    Rep Power
    7

    Default

    Quote Originally Posted by Michael REMY View Post
    the ftp server is down. Shall you help me to find his project/class ?
    read at page 2
    [SOLVED] PHP Class for easy access to Zimbra SOAP API
    YetOpen S.r.l. ~ Your open source partner
    Lecco (LC) - ITALY
    http://www.yetopen.it

Page 3 of 5 FirstFirst 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 03-01-2008, 08:21 PM
  2. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 08:55 AM
  3. Can't start Zimbra!
    By zibra in forum Administrators
    Replies: 5
    Last Post: 03-22-2007, 11:34 AM
  4. Replies: 8
    Last Post: 02-27-2007, 04:10 AM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 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
  •