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-13-2007, 04:20 PM
Starter Member
 
Posts: 2
Default [SOAP]trash operater in MsgActionRequest not working

Hello,

I tested some of SOAP APIs for my assignment that will trash many old messages in batch.

I wrote codes in ruby and initiated MsgActionRequest looking like this:

Quote:
<n2:MsgActionRequest xmlns:n2="urn:zimbraMail">
<action op="trash"
id="1387"></action>
</n2:MsgActionRequest>
However, the API returns an error like this:

Quote:
<soap:Body><soap:Fault><soap:faultcode>soap:Client </soap:faultcode><soap:faultstring>invalid request: unknown operation: trash</soap:faultstring><soap:detail><Error xmlns="urn:zimbra"><Code>service.INVALID_REQUEST</Code><Trace>com.zimbra.cs.service.ServiceException : invalid request: unknown operation: trash
My code works fine with "spam" and "delete" operators. Do I miss something in my SOAP request?
Reply With Quote
  #2 (permalink)  
Old 09-13-2007, 06:54 PM
Zimbra Employee
 
Posts: 1,434
Default

I believe that the "trash" operation is valid only in ZCS 5.0. If you're using a 4.5.X version of the server, that operation is not available.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 09-14-2007, 12:39 PM
Starter Member
 
Posts: 2
Default

Thank you very much. I think I will use 5.0 for a production system, but for development I'd like to use one I use now. Is there any work around on this? Can I use "move" to trash instead? How can I write the request message in SOAP?
Reply With Quote
  #4 (permalink)  
Old 09-14-2007, 04:26 PM
Zimbra Employee
 
Posts: 1,434
Default

You can certainly use op="move" l="3". The main benefit to op="trash" is that it resolves any naming conflicts you may have in the Trash folder.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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.