同步时未记录的 Exchange ActiveSync 状态
我正在尝试构建一个简单的 Exchange ActiveSync 客户端。
我使用一个简单的 Python 脚本,在连接到 Exchange 2010 SP1 时发送初始同步电子邮件命令。
在请求正文中,我发送以下编码为 WBXML 的 XML(使用 pywbxml):
<?xml version="1.0"?>
<!DOCTYPE AirSync PUBLIC "-//AIRSYNC//DTD AirSync//EN" "http://www.microsoft.com/">
<Sync>
<Collections>
<Collection>
<Class>Email</Class>
<SyncKey>0</SyncKey>
<CollectionId>5</CollectionId>
</Collection>
</Collections>
</Sync>
服务器用 200 OK
应答,但返回 状态代码:4
<?xml version="1.0"?>
<!DOCTYPE AirSync PUBLIC "-//AIRSYNC//DTD AirSync//EN" "http://www.microsoft.com/">
<Sync>
<Status>4</Status>
</Sync>
我不能'在官方文档中找不到有关此状态代码的任何文档。我怎样才能弄清楚这一点?
I'm trying to build a simple Exchange ActiveSync client.
I'm using a simple Python script that sends an initial sync email command, while connecting to an Exchange 2010 SP1 .
In the request body I'm send the following XML encoded as WBXML (using pywbxml):
<?xml version="1.0"?>
<!DOCTYPE AirSync PUBLIC "-//AIRSYNC//DTD AirSync//EN" "http://www.microsoft.com/">
<Sync>
<Collections>
<Collection>
<Class>Email</Class>
<SyncKey>0</SyncKey>
<CollectionId>5</CollectionId>
</Collection>
</Collections>
</Sync>
The server answers with a 200 OK
but returns a Status code: 4
<?xml version="1.0"?>
<!DOCTYPE AirSync PUBLIC "-//AIRSYNC//DTD AirSync//EN" "http://www.microsoft.com/">
<Sync>
<Status>4</Status>
</Sync>
I couldn't find any documentation on this status code in the official docs. How can I figure this out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Sync
状态代码值4
表示客户端协议错误。它记录在此 MSDN 页面 。正确的
Sync
命令看起来更像下面这样,假设Inbox
的 ID 为 5(从 WBXML 转换为可读的 XML):EAS 协议要求您 <但是,首先要使用 code>Provision 和
FolderSync
。您不能直接跳到Sync
。 此处描述了基本协议顺序。The
Sync
status code value4
represents a client protocol error. It is documented on this MSDN page.A correct
Sync
command would look more like the following, assuming thatInbox
has an ID of 5 (converted from WBXML to a readable XML):The EAS protocol requires that you
Provision
andFolderSync
first, however. You can't just jump straight to aSync
. The basic protocol sequence is described here.