Results 1 to 8 of 8

Thread: Reading messages using soap

  1. #1
    Join Date
    Jun 2007
    Posts
    12
    Rep Power
    8

    Default Reading messages using soap

    I am building a DNN module in .Net, I need to send a soap message to the zimbra server to get an email for a given user. Now, I see where I can use GetMsgRequest to do this; however, what I cannot figure out is how I get the message id. Is there a soap call to do this?

  2. #2
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    10

    Default

    Quote Originally Posted by ljjoey View Post
    I am building a DNN module in .Net, I need to send a soap message to the zimbra server to get an email for a given user. Now, I see where I can use GetMsgRequest to do this; however, what I cannot figure out is how I get the message id. Is there a soap call to do this?
    Check out the searching messages (SearchRequest). This will return the Conversation ids that you need to fetch messages. Interestingly enough, since most Zimbra Data sources are actually messages (Calender Items, Mail Items, and Wiki), you can use this one SOAP function to navigate everything.
    Last edited by JoshuaPrismon; 06-16-2007 at 11:14 AM.

  3. #3
    Join Date
    Jun 2007
    Posts
    12
    Rep Power
    8

    Default

    I had gotten that far; however, I still cannot seen to find the messages. If I read the documentation properly, this should reteive all the messages with a subject of Anotherone. But you can see what it returned.

    <ns0:SearchRequest types="message" limit="5" sortBy="dateDesc" fetch="all" field="subject" offset="0" xmlns:ns0="urn:zimbraMail">
    <query>subject: Anotherone</query>
    </ns0:SearchRequest>

    <ns0:SearchResponse sortBy="dateDesc" more="0" offset="0" xmlns:ns0="urn:zimbraMail">
    <ns0:info>
    <ns0:sizeEstimate value="-1"/>
    <ns0:spell word="anotherone"/>
    </ns0:info>
    </ns0:SearchResponse>


    First, is there something wrong with my request? If not, does the message have to be unread?


    ****** UPDATE ********
    I figured out part of this. I was using the admin account to do the search. However, I don't seem to be able to get authentication on a non-admin account.
    Last edited by ljjoey; 06-18-2007 at 02:10 PM.

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

    Default

    Quote Originally Posted by ljjoey View Post
    I figured out part of this. I was using the admin account to do the search. However, I don't seem to be able to get authentication on a non-admin account.
    Use urn:zimbraAccount instead of urn:zimbraAdmin when you do non-admin auth.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    Join Date
    Jun 2007
    Posts
    12
    Rep Power
    8

    Default

    That worked, even though, I was using the perl constant in the sample poerl code $ACCOUNTNS, which you would think was zimbraAccount. Thanks for making me make sure.

    So, now the next step, is creating a web reference from visual studio. however, I get the following message from the server when I attempt to connect to the admin service:

    HTTP Status 405 - HTTP method GET is not supported by this URL

    --------------------------------------------------------------------------------

    type Status report

    message HTTP method GET is not supported by this URL

    description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).


    --------------------------------------------------------------------------------

    Apache Tomcat/5.5.15



    I am thinking that something is not setup correctly, any ideas?

  6. #6
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    10

    Default

    Quote Originally Posted by ljjoey View Post
    That worked, even though, I was using the perl constant in the sample poerl code $ACCOUNTNS, which you would think was zimbraAccount. Thanks for making me make sure.

    So, now the next step, is creating a web reference from visual studio. however, I get the following message from the server when I attempt to connect to the admin service:

    HTTP Status 405 - HTTP method GET is not supported by this URL

    --------------------------------------------------------------------------------

    type Status report

    message HTTP method GET is not supported by this URL

    description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).


    --------------------------------------------------------------------------------

    Apache Tomcat/5.5.15



    I am thinking that something is not setup correctly, any ideas?

    You need to issue the request via POST, since you are passing a SOAP request to the front end. Also you probably don't want to pass the AUTH token in the request string which is cacheable in the front end.

  7. #7
    Join Date
    Jun 2007
    Posts
    12
    Rep Power
    8

    Default

    I am using a post. The Web Reference wizard is not. I figured out that this method of connecting is just not supported. Thanks

  8. #8
    Join Date
    Jun 2009
    Posts
    6
    Rep Power
    6

    Default

    Hi Mate, i am trying to build a .net dll to talk to Zimbra via SOAP,, just read your post now something about the method is not supported. would you please give a hand.. Cheers

Similar Threads

  1. SOAP messages and Security
    By anuradha_mihsra in forum Developers
    Replies: 1
    Last Post: 07-31-2007, 09:15 PM
  2. Retrieve e-mail messages via soap
    By kuip in forum Developers
    Replies: 2
    Last Post: 07-23-2007, 02:19 PM
  3. Spam assassain not traiing properly!
    By Mike T in forum Administrators
    Replies: 1
    Last Post: 10-09-2006, 02:34 PM
  4. Manage Zimbra through SOAP messages
    By msca in forum Developers
    Replies: 5
    Last Post: 03-07-2006, 03:43 PM
  5. Move server to different OS
    By EriSan500 in forum Administrators
    Replies: 7
    Last Post: 03-05-2006, 01:00 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
  •