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
  #1 (permalink)  
Old 02-21-2008, 07:51 AM
Junior Member
 
Posts: 5
Thumbs up Zimbra SOAP

Hi I am trying to create a contacts in a folder similar to the default Address book. I am using the below SOAP Envelop to do it.
Code:
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header>
		<context xmlns="urn:zimbra">
			<authToken>
				0_3272262ab62f529a5ecbecffc0028bb8b13d3afe_69643d33363a37323037613338302d383639312d343266632d613761392d6536376530383265613736383b6578703d337373832343831323b
			</authToken>
			<sessionId id="85">85</sessionId>
		</context>
	</SOAP-ENV:Header>
	<SOAP-ENV:Body>
		<CreateFolderRequest xmlns="urn:zimbraMail">
			<folder fie="1" l="7" name="SugarContacts" />
		</CreateFolderRequest>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Below is the response SOAP Message
Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Header>
		<context xmlns="urn:zimbra">
			<sessionId id="85">85</sessionId>
			<change token="1100" />
		</context>
	</soap:Header>
	<soap:Body>
		<CreateFolderResponse xmlns="urn:zimbraMail">
			<folder id="261" name="SugarContacts" l="7" />
		</CreateFolderResponse>
	</soap:Body>
</soap:Envelope>
When I login through Zimbra client I cannot see the folder SugarContacts created within Contacts folder or AddressBook. If anyone has faced this issue and has solution please get back to ASAP.

Last edited by allwyndsouza360; 02-21-2008 at 08:38 AM..
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 08:29 AM
raj raj is offline
Moderator
 
Posts: 759
Default

** Please update your post ***

you NEVER want to publish your ADMIN TOKEN..
if someone know your server link they can take this and have full ADMIN access using ADMIN SOAP api.

Admin token stays in session for 12 hours by default

Raj
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 08:37 AM
Junior Member
 
Posts: 5
Default

Got the solution. It needs the view attribute to be set as contact in the create folder request.

Code:
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header>
		<context xmlns="urn:zimbra">
			<authToken>
				0_dead990fb54a6b6f107fcebb6738401a9a99badc_69643d33363a37323037613338302d383639312d343266632d613761392d6536376530383265613736383b6578703d31333a313230333738303732313539393b
			</authToken>
			<sessionId id="90">90</sessionId>
		</context>
	</SOAP-ENV:Header>
	<SOAP-ENV:Body>
		<CreateFolderRequest xmlns="urn:zimbraMail">
			<folder fie="1" l="1" name="SugarContacts" view="contact" />
		</CreateFolderRequest>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 08:38 AM
Zimbra Employee
 
Posts: 1,434
Default

I think that the Advanced client does not display addressbooks that are subfolders of other folders. Try moving the new addressbook to the top level (l="1") and see if things work for you.

I believe there's already a bug filed to the effect that the Advanced client should display nested addressbooks. I'd suggest voting for it as well!
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 08:40 AM
Junior Member
 
Posts: 5
Default

I appreciate your advice and will take care next time on. However they are not admin tokens.
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 08:42 AM
Junior Member
 
Posts: 5
Default

The solution is setting the view attribute for folder tag in create folder request to contacts and parent folder l="1"

Code:
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header>
		<context xmlns="urn:zimbra">
			<authToken>
				
			</authToken>
			<sessionId id=""></sessionId>
		</context>
	</SOAP-ENV:Header>
	<SOAP-ENV:Body>
		<CreateFolderRequest xmlns="urn:zimbraMail">
			<folder fie="1" l="1" name="SugarContacts" view="contact" />
		</CreateFolderRequest>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
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.