| 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.
|  | 
06-15-2007, 04:07 PM
| | | 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? | 
06-16-2007, 10:06 AM
| | Zimlet Guru & Moderator | |
Posts: 467
| | Quote:
Originally Posted by ljjoey 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..
| 
06-18-2007, 12:32 PM
| | | 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..
| 
06-18-2007, 01:25 PM
| | Zimbra Employee | |
Posts: 1,434
| | Quote:
Originally Posted by ljjoey 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. | 
06-19-2007, 09:42 AM
| | | 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? | 
06-19-2007, 12:02 PM
| | Zimlet Guru & Moderator | |
Posts: 467
| | Quote:
Originally Posted by ljjoey 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. | 
06-19-2007, 12:05 PM
| | | I am using a post. The Web Reference wizard is not. I figured out that this method of connecting is just not supported. Thanks | 
09-07-2009, 07:40 AM
| | | 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 | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |