WP8-客户端中的SyncML协议停止响应

时间:2013-02-15 13:31:41

标签: windows-phone-8 mdm syncml

我正在努力让我的Windows Phone 8 MDM系统正常运行。当前设备正确注册并初始化SyncML请求。它还响应服务器的初始响应中的查询,但我认为它不喜欢它中的内容。原因是它使用重试间隔与服务器建立额外的连接,然后再不再连接。

当我手动启动连接时,它可以正常工作,但不会进行自动连接。奇怪的是,SyncML SessionID计数器在内部以指定的时间间隔增加,但设备甚至没有尝试连接服务器。

这是我的SyncML协议

客户启动:

   <SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncHdr>
    <VerDTD>1.2</VerDTD>
    <VerProto>DM/1.2</VerProto>
    <SessionID>E</SessionID>
    <MsgID>1</MsgID>
    <Target>
      <LocURI>https://ssl.../enrollment/omadmservice.php</LocURI>
    </Target>
    <Source>
      <LocURI>IMEI:35...64</LocURI>
      <LocName>riho</LocName>
    </Source>
    <Cred>
      <Meta>
        <Format xmlns="syncml:metinf">b64</Format>
        <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
      </Meta>
      <Data>SoFh6khg4awLYXn2PQOOwQ==</Data>
    </Cred>
  </SyncHdr>
  <SyncBody>
    <Alert>
      <CmdID>2</CmdID>
      <Data>1201</Data>
    </Alert>
    <Replace>
      <CmdID>3</CmdID>
      <Item>
        <Source>
          <LocURI>./DevInfo/DevId</LocURI>
        </Source>
        <Data>IMEI:35...64</Data>
      </Item>
       ...
    </Replace>
    <Final/>
  </SyncBody>
</SyncML>

服务器响应:

<SyncML xmlns="SYNCML:SYNCML1.2">
    <SyncHdr>
        <VerDTD>1.2</VerDTD>
        <VerProto>DM/1.2</VerProto>
        <SessionID>E</SessionID>
        <MsgID>1</MsgID>
        <Target>
            <LocURI>IMEI:35...64</LocURI>
        </Target>
        <Source>
            <LocURI>https://ssl.../enrollment/omadmservice.php</LocURI>
            <LocName>MDMServer</LocName>
        </Source>
        <Cred>
          <Meta>
            <Format xmlns="syncml:metinf">b64</Format>
            <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
          </Meta>
          <Data>ryJ+boSmdCoO8BzxXcYSxg==</Data>
       </Cred>
    </SyncHdr>
    <SyncBody>
      <Status>
        <CmdID>1</CmdID>
        <MsgRef>1</MsgRef>
        <CmdRef>0</CmdRef>
        <Cmd>SyncHdr</Cmd>
        <Data>212</Data> 
      </Status>
    <Status>
        <MsgRef>1</MsgRef>
        <CmdRef>2</CmdRef>
        <CmdID>2</CmdID>
        <Cmd>Alert</Cmd>
        <Data>200</Data>
    </Status>
    <Status>
        <CmdID>3</CmdID>
        <MsgRef>1</MsgRef>
        <CmdRef>3</CmdRef>
        <Cmd>Replace</Cmd>
        <Data>200</Data>
    </Status>
    <Get>
        <CmdID>4</CmdID>
        <Item>
            <Target>
                <LocURI>./Vendor/MSFT/Registry/HKLM/Software/Microsoft/DeviceEncryption/Enabled</LocURI>
            </Target>
        </Item>
    </Get>
    </SyncBody>
</SyncML>

客户发送回复:

<SyncML xmlns="SYNCML:SYNCML1.2">
  <SyncHdr>
    <VerDTD>1.2</VerDTD>
    <VerProto>DM/1.2</VerProto>
    <SessionID>E</SessionID>
    <MsgID>2</MsgID>
    <Target>
      <LocURI>https://ssl.../enrollment/omadmservice.php</LocURI>
    </Target>
    <Source>
      <LocURI>IMEI:35...64</LocURI>
    </Source>
  </SyncHdr>
  <SyncBody>
    <Status>
      <CmdID>1</CmdID>
      <MsgRef>1</MsgRef>
      <CmdRef>0</CmdRef>
      <Cmd>SyncHdr</Cmd>
      <Chal>
        <Meta>
          <Format xmlns="syncml:metinf">b64</Format>
          <Type xmlns="syncml:metinf">syncml:auth-md5</Type>
          <NextNonce xmlns="syncml:metinf">kjjz6FyCYuYm9VUsSaHfKmj98GGfh9yeLvv8hlMNZak=</NextNonce>
        </Meta>
      </Chal>
      <Data>212</Data>
    </Status>
    <Status>
      <CmdID>2</CmdID>
      <MsgRef>1</MsgRef>
      <CmdRef>4</CmdRef>
      <Cmd>Get</Cmd>
      <Data>200</Data>
    </Status>
    <Results>
      <CmdID>3</CmdID>
      <MsgRef>1</MsgRef>
      <CmdRef>4</CmdRef>
      <Item>
        <Source>
          <LocURI>./Vendor/MSFT/Registry/HKLM/Software/Microsoft/DeviceEncryption/Enabled</LocURI>
        </Source>
        <Meta>
          <Format xmlns="syncml:metinf">int</Format>
        </Meta>
        <Data>1</Data>
      </Item>
    </Results>
    <Final/>
  </SyncBody>
</SyncML>

服务器存储数据并断开连接。

任何人都可以在我的实施中发现错误吗?客户对服务器的期望是什么?

1 个答案:

答案 0 :(得分:0)

我发现问题不是在我的实现中,而是在有缺陷的Microsoft文档中。在他们的“WP8企业管理协议1.2”中,他们修复了协议中的几个拼写错误,现在连接工作正常。