SyncML Command是否有大小限制可以发送到Windows Phone 8.1?

时间:2014-09-17 12:08:50

标签: windows-phone-8.1 mdm

我可以发送到Windows Phone 8.1设备的SyncML命令是否有任何大小限制(我正在使用Lumia 1320进行测试。)?当我将以下SyncML命令发送到设备时,我得不到设备的响应:

<?xml version="1.0" ?><SyncML xmlns="SYNCML:SYNCML1.2"><SyncHdr/><SyncBody><Atomic><CmdID>InstallProfile</CmdID><Replace><CmdID>res-email-passcode.passwordpolicy</CmdID><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/DevicePasswordEnabled</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/AllowSimpleDevicePassword</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>4</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/MinDevicePasswordLength</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/AlphanumericDevicePasswordRequired</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/DevicePasswordExpiration</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/DevicePasswordHistory</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/MaxDevicePasswordFailedAttempts</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/MaxInactivityTimeDeviceLock</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/DeviceLock/Provider/MEMDM/MinDevicePasswordComplexCharacters</LocURI></Target><Meta><Format>int</Format></Meta></Item></Replace><Replace><CmdID>res-email-passcode.restrictionspolicy</CmdID><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/System/AllowStorageCard</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Security/RequireDeviceEncryption</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>2</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/System/AllowTelemetry</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Security/AllowManualRootCertificateInstallation</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/System/AllowUserToResetPhone</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowSyncMySettings</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowCortana</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/AboveLock/AllowActionCenterNotifications</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowSharingOfOfficeFiles</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowSaveAsOfOfficeFiles</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowVoiceRecording</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Search/AllowStoringImagesFromVisionSearch</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Search/AllowSearchToUseLocation</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Connectivity/AllowCellularDataRoaming</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Connectivity/AllowUSBConnection</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/System/AllowLocation</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowScreenCapture</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Browser/AllowBrowser</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/ApplicationManagement/AllowStore</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Accounts/AllowAddingNonMicrosoftAccountsManually</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Experience/AllowCopyPaste</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Connectivity/AllowVPNOverCellular</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Connectivity/AllowVPNRoamingOverCellular</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>2</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/Connectivity/AllowBluetooth</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/WiFi/AllowManualWiFiConfiguration</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/WiFi/AllowWiFiHotSpotReporting</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/WiFi/AllowWiFi</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/WiFi/AllowInternetSharing</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>1</Data><Target><LocURI>./Vendor/MSFT/PolicyManager/My/WiFi/AllowAutoConnectToWiFiSenseHotspots</LocURI></Target><Meta><Format>int</Format></Meta></Item></Replace><Replace><CmdID>res-email-passcode.emailpolicy</CmdID><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D</LocURI></Target><Meta><Format>node</Format></Meta></Item><Item><Data>Email</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/ACCOUNTTYPE</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>some@email.com</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/AUTHNAME</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/AUTHREQUIRED</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/AUTHSECRET</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/DOMAIN</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>-1</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/DWNDAY</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>smtp:25</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/INSERVER</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>15</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/LINGER</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data>Some Mail</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/NAME</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>smtp:25</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/OUTSERVER</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/REPLYADDR</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>EMail</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/SERVICENAME</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>imap4</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/SERVICETYPE</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/SMTPALTAUTHNAME</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/SMTPALTDOMAIN</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/SMTPALTENABLED</LocURI></Target><Meta><Format>int</Format></Meta></Item><Item><Data/><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/SMTPALTPASSWORD</LocURI></Target><Meta><Format>chr</Format></Meta></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/TAGPROPS/8128000B</LocURI></Target></Item><Item><Data>0</Data><Target><LocURI>./Vendor/MSFT/EMAIL2/%7B4b3b88ed-9834-44c8-b767-8dc3472aea25%7D/TAGPROPS/812C000B</LocURI></Target></Item></Replace></Atomic></SyncBody></SyncML>

但是,如果我减少限制命令中的项目数,我可以从设备获得响应。单独发送完整限制列表也有效。这是由于Windows Phone 8.1的MDM设计吗?或者我做错了什么?

1 个答案:

答案 0 :(得分:0)

我想出来了!

显然,SyncML命令没有明显的大小限制。但是有一个运行服务器的Apache Tomcat。 Tomcat将消息的最大大小限制为8KB,超出此范围的任何消息都将是“ chunked ”,即作为多部分消息发送。 Windows Phone 8不接受“分块”消息。 解决方案是手动强制Tomcat发送消息&gt;通过在servlet中设置响应数据的缓冲区大小,将8KB作为单个包:

response.setBufferSize(responseData.length());

这会强制Tomcat将整个消息作为单个包发送。现在命令有效!