Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old 10-26-2009, 05:03 PM
Member
 
Posts: 10
Default xmlparse

Im having this error on the xmlparse.php

any suggestions?

XML error: Not well-formed (invalid token) at line 1
Reply With Quote
  #22 (permalink)  
Old 10-27-2009, 02:04 AM
Project Contributor
 
Posts: 14
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,
Reply With Quote
  #23 (permalink)  
Old 10-27-2009, 10:33 AM
Member
 
Posts: 10
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.
Reply With Quote
  #24 (permalink)  
Old 12-03-2009, 04:12 AM
Intermediate Member
 
Posts: 16
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.
Reply With Quote
  #25 (permalink)  
Old 12-04-2009, 10:24 AM
New Member
 
Posts: 3
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..
Reply With Quote
  #26 (permalink)  
Old 12-04-2009, 10:44 AM
New Member
 
Posts: 3
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
Reply With Quote
  #27 (permalink)  
Old 12-18-2009, 02:59 PM
Starter Member
 
Posts: 1
Default

Wow, just tested the class and it seems to work great! Saved me alot of work, thanks
Reply With Quote
  #28 (permalink)  
Old 01-12-2010, 08:32 AM
Intermediate Member
 
Posts: 16
Default

Just spotted your reply. This does seem to work. Thanks very much for sharing your fix.
Reply With Quote
  #29 (permalink)  
Old 03-15-2010, 04:20 AM
Loyal Member
 
Posts: 92
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
Reply With Quote
  #30 (permalink)  
Old 03-15-2010, 05:45 AM
Trained Alumni
 
Posts: 313
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.