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 09-15-2009, 09:48 AM
Junior Member
 
Posts: 5
Default [SOLVED] Manage Address Book by SOAP

I would like to know if there are some way to do SOAP request for create contact group into user address book
Reply With Quote
  #2 (permalink)  
Old 09-15-2009, 10:39 AM
Junior Member
 
Posts: 5
Default CreateContactRequest

I am testing CreateContactRequest, but I would like know if I can request this using admin credentials, but create contact into personal address book of each user
Reply With Quote
  #3 (permalink)  
Old 09-15-2009, 05:41 PM
Junior Member
 
Posts: 5
Default SOAP Message

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<account by="name">pruebas@ups.edu.ec</account>
<authToken>0_dcac1c27ac2dc5086613b
</authToken>
</context>
</soap:Header>
<soap:Body>
<context xmlns="urn:zimbraMail">
<CreateContactRequest>
<cn>
<a n="fileAs">8:Pruebas</a>
<a n="nickname">Pruebas</a>
<a n="dlist">""Alberto Galarza Ramos" <agalarza@ups.edu.ec>, "Andrea Molina" <amolina@ups.edu.ec>"</a>
<a n="type">group</a>
</cn>
</CreateContactRequest>
</context>
</soap:Body>
</soap:Envelope>

But I have error on response
Reply With Quote
  #4 (permalink)  
Old 09-16-2009, 08:24 AM
Junior Member
 
Posts: 5
Default Change SOAP Message

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><account by="name">pruebas@ups.edu.ec</account><authToken>0_9148566536a300b</authToken></context></soap:Header><soap:Body><CreateContactRequest xmlns="urn:zimbraMail"><cn><a n="fileAs">8:Pruebas</a><a n="nickname">Pruebas</a><a n="dlist">""john doe" <foo@bar.com>"</a><a n="type">group</a></cn></CreateContactRequest></soap:Body></soap:Envelope>


But I have some problem now with ""john doe" <foo@bar.com>" I checked in mailbox.log and get the follow error

2009-09-16 09:13:25,128 INFO [btpool0-1555] [ip=172.16.2.6;] soap - AuthRequest
2009-09-16 09:13:25,184 WARN [btpool0-1555] [ip=172.16.2.6;] SoapEngine - SOAP exception
com.zimbra.common.service.ServiceException: parse error: Error on line 1 of document : Element type "foo" must be followed by either attribute specifications, ">" or "/>". Nested exception: Element type "foo" must be followed by either attribute specifications, ">" or "/>".
ExceptionId:btpool0-1555:1253110405184:e3d68a1f2382d2bc
Code:service.PARSE_ERROR

But when I debug SOAP request from Zimbra Web Client I see that use < > for email john doe" <foo@bar.com>
Reply With Quote
  #5 (permalink)  
Old 09-16-2009, 10:48 AM
Junior Member
 
Posts: 5
Default Modifiy dlist value

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><account by="name">pruebas@ups.edu.ec</account><authToken>0_33b89b13822</authToken></context></soap:Header><soap:Body><CreateContactRequest xmlns="urn:zimbraMail"><cn><a n="fileAs">8:Pruebas</a><a n="nickname">Pruebas</a><a n="dlist">Juan Carlos &lt;oiuyo@eee.com&gt; , Juan Perez &lt;etewr@xde.dot&gt;</a><a n="type">group</a></cn></CreateContactRequest></soap:Body></soap: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.