Results 1 to 6 of 6

Thread: Zimbra SOAP

  1. #1
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    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.

  2. #2
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    11

    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

  3. #3
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    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>

  4. #4
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    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!

  5. #5
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    Default

    I appreciate your advice and will take care next time on. However they are not admin tokens.

  6. #6
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    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>

Similar Threads

  1. [SOLVED] Spam Being Sent Thru Server - Help Needed!
    By msf004 in forum Administrators
    Replies: 22
    Last Post: 03-15-2008, 12:11 AM
  2. Creating accounts problem
    By d64 in forum Administrators
    Replies: 17
    Last Post: 02-13-2008, 07:24 AM
  3. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 09:56 PM
  4. Cleanup after many upgrades
    By tobru in forum Installation
    Replies: 1
    Last Post: 12-23-2007, 09:21 AM
  5. 4.5 Upgrade failure
    By brained in forum Installation
    Replies: 9
    Last Post: 03-03-2007, 03:30 PM

Posting Permissions

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