View Single Post
  #9 (permalink)  
Old 12-21-2006, 01:40 PM
seeker seeker is offline
Intermediate Member
 
Posts: 19
Default

I am sending the exact same request without <format type="js">. which is 19 characters.

My code calculates the length of the soap body right before posting it and puts it in the header. It calculates the lenght starting from begining of "<soap:Envelope"...to the end of..."</soap:Envelope>"

Here is my request with <format type="js"/> which works.
Code:
POST /service/admin/soap/ HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
User-Agent: Test application
Host: 192.168.0.180:7071
Content-Length: 332
Connection: Keep-Alive
Cache-Control: no-cache
Pragma: no-cache

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><nosession/><format type="js"/></context></soap:Header><soap:Body><AuthRequest xmlns="urn:zimbraAccount"><account by="name">amir.far@xxxxxxxxx.com</account><password>1234</password></AuthRequest></soap:Body></soap:Envelope>
And here is the request without format tag, which does not work, (time out):
Code:
POST /service/admin/soap/ HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
User-Agent: Test application
Host: 192.168.0.180:7071
Content-Length: 313
Connection: Keep-Alive
Cache-Control: no-cache
Pragma: no-cache

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><nosession/></context></soap:Header><soap:Body><AuthRequest xmlns="urn:zimbraAccount"><account by="name">amir.far@xxxxxxxxx.com</account><password>1234</password></AuthRequest></soap:Body></soap:Envelope>
Note that the content length is 19 characters shorter.

By the way, I have replaced my 9 characters long domain name with 9 "x"s.
Reply With Quote