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 06-15-2007, 04:07 PM
Member
 
Posts: 12
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?
Reply With Quote
  #2 (permalink)  
Old 06-16-2007, 10:06 AM
Zimlet Guru & Moderator
 
Posts: 467
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 10:14 AM..
Reply With Quote
  #3 (permalink)  
Old 06-18-2007, 12:32 PM
Member
 
Posts: 12
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 01:10 PM..
Reply With Quote
  #4 (permalink)  
Old 06-18-2007, 01:25 PM
Zimbra Employee
 
Posts: 1,434
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!
Reply With Quote
  #5 (permalink)  
Old 06-19-2007, 09:42 AM
Member
 
Posts: 12
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?
Reply With Quote
  #6 (permalink)  
Old 06-19-2007, 12:02 PM
Zimlet Guru & Moderator
 
Posts: 467
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.
Reply With Quote
  #7 (permalink)  
Old 06-19-2007, 12:05 PM
Member
 
Posts: 12
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
Reply With Quote
  #8 (permalink)  
Old 09-07-2009, 07:40 AM
Junior Member
 
Posts: 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
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.