0

I am trying to send the SearchRequest to find the stuff I need in the mailbox. However, I keep on getting the unknown Document error.

POST /service/soap HTTP/1.1
SOAPAction: ""
Content-Type: text/xml;charset="utf-8"
Accept: text/xml
Host: 192.168.138.133
Content-Length: 514
Expect: 100-continue

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Header>
    <authToken>%token acquired from AuthRequest%</authToken>
    <context xmlns="urn:zimbra" />
  </soap:Header>
  <soap:Body>
    <SearchRequest xlmns="urn:zimbraMail">
      <query>is:unread</query>
    </SearchRequest>
  </soap:Body>
</soap:Envelope>

It seems to me, that I have the wrong xmlns specified, but the zimbra soap api reference says that the namespace should be zimbraMail. Still I keep on getting the error.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Cracker
  • 912
  • 2
  • 14
  • 26

2 Answers2

0

Shouldn't there be a session somewhere in the headers ? (inside context)

http://dropcanvas.com/521xc/91

ychaouche
  • 4,922
  • 2
  • 44
  • 52
0

Try

<soap:Header>
    <context xmlns="urn:zimbra" >
          <authToken>%token acquired from AuthRequest%</authToken>
    </context>
  </soap:Header>