Zimbra SOAP SearchRequest返回未知文档错误

时间:2012-11-03 16:18:42

标签: soap zimbra

我正在尝试发送SearchRequest以查找邮箱中需要的内容。但是,我一直收到unknown Document错误。

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>

在我看来,我指定了错误的xmlns,但the zimbra soap api reference表示命名空间应为zimbraMail。我仍然继续犯错误。

2 个答案:

答案 0 :(得分:0)

标题中的某个地方是否应该有会话? (内部背景)

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

答案 1 :(得分:0)

尝试

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