Results 1 to 4 of 4

Thread: [SOAP]trash operater in MsgActionRequest not working

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Rep Power
    8

    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:

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

    <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?

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

    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!

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Rep Power
    8

    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?

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

    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!

Posting Permissions

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