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 07-10-2010, 05:29 PM
New Member
 
Posts: 4
Default [SOLVED] After request I get (500) Internal Server Error

I can't seem to get off first base using c# with soap. My XML message is:

<?xml version='1.0'?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra"/>
</soap:Header>
<soap:Body>
<AuthRequest xmlns="urn:zimbraAdmin"><name>user@domain</name><password>password</password></AuthRequest>
</soap:Body>
</soap:Envelope>

and my code is

AuthToken = getAuthRequest("user@domain", "password");

HttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create("https://domain:7071/service/admin/soap");
webrequest.Headers.Add("SOAPAction", "\"\"");
webrequest.Method = "POST";
webrequest.ContentType = "text/xml;charset=\"utf-8\"";

XmlDocument requestDoc = new XmlDocument();
requestDoc.LoadXml(AuthToken);

System.IO.Stream str = webrequest.GetRequestStream();

requestDoc.Save(str);
str.Close();

HttpWebResponse webresponse = (HttpWebResponse)webrequest.GetResponse();

==================================================
I've compared this to other examples I've found on the web and can't see where I have gone wrong.
Reply With Quote
  #2 (permalink)  
Old 07-13-2010, 03:38 AM
New Member
 
Posts: 4
Default

I managed to get it to work by using the admin user but using any other user (even with domain/service/soap) gave the error.
I can't understand this how does the zimbra standalone program log in?
Reply With Quote
  #3 (permalink)  
Old 07-16-2010, 04:38 AM
Active Member
 
Posts: 37
Default

be sure to watch log, if any request goes to zimbra , an entry will be there in the the following log file,

run, this command
tail -f /opt/zimbra/log/mailbox.log
Reply With Quote
  #4 (permalink)  
Old 07-17-2010, 02:57 AM
New Member
 
Posts: 4
Default

I found that there are two versions of the AuthRequest request. I've just done a few more changes and it is annoying getting the 500 server errors rather than something meaningful.
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.