我开发了一个syncml服务器,我没有从服务器到客户端(诺基亚e71)同步修改后的联系人。所有其他工作除外,当我命令替换现有localuid的客户端时。客户端返回给我然后该命令的状态415(数据的类型或格式不对应),而客户接受相同的数据以进行添加(通过命令添加或替换)。
有人已经遇到过这个问题吗?
以下是客户端和服务器之间发送的消息:
带有替换命令的服务器消息:
<?xml version="1.0" ?>
<!DOCTYPE SyncML
PUBLIC "-//SYNCML//DTD SyncML 1.2//EN"
"http://www.openmobilealliance.org/tech/DTD/OMA-TS-SyncML_RepPro_DTD-V1_2.dtd">
<SyncML xmlns="SYNCML:SYNCML1.2">
<SyncHdr>
<VerDTD>1.2</VerDTD><VerProto>SyncML/1.2</VerProto><SessionID>235</SessionID><MsgID>3</MsgID> <Target><LocURI>IMEI:358240030276208</LocURI></Target> <Source><LocURI>http://192.168.8.20:50000</LocURI></Source> <Meta>
<MaxMsgSize xmlns="syncml:metinf">1000000</MaxMsgSize><MaxObjSize xmlns="syncml:metinf">4000000</MaxObjSize>
</Meta>
</SyncHdr>
<SyncBody>
<Status>
<CmdID>1</CmdID><MsgRef>3</MsgRef><CmdRef>0</CmdRef><Cmd>SyncHdr</Cmd> <TargetRef>http://192.168.8.20:50000</TargetRef> <SourceRef>IMEI:358240030276208</SourceRef> <Data>200</Data>
</Status> <Status>
<CmdID>2</CmdID><MsgRef>3</MsgRef><CmdRef>3</CmdRef><Cmd>Sync</Cmd> <SourceRef>./C:Contacts.cdb</SourceRef> <TargetRef>./card</TargetRef> <Data>200</Data>
</Status> <Sync>
<CmdID>3</CmdID> <Source><LocURI>./card</LocURI></Source> <Target><LocURI>./C:Contacts.cdb</LocURI></Target><NumberOfChanges>1</NumberOfChanges> <Replace>
<CmdID>4</CmdID> <Meta><Type xmlns="syncml:metinf">text/x-vcard</Type> </Meta> <Item> <Target><LocURI>69</LocURI></Target> <Data>
<![CDATA[BEGIN:VCARD VERSION:2.1 N:Smith;Change;;; FN:Change Smith END:VCARD]]>
</Data> </Item>
</Replace>
</Sync> <Final/>
</SyncBody>
</SyncML>
具有替换命令状态的客户端消息:
<?xml version="1.0" ?>
<!DOCTYPE SyncML
PUBLIC '-//SYNCML//DTD SyncML 1.2//EN'
'http://www.openmobilealliance.org/tech/DTD/OMA-TS-SyncML_RepPro_DTD-V1_2.dtd'>
<SyncML xmlns="SYNCML:SYNCML1.2">
<SyncHdr>
<VerDTD>
1.2
</VerDTD>
<VerProto>
SyncML/1.2
</VerProto>
<SessionID>
235
</SessionID>
<MsgID>
4
</MsgID>
<Target>
<LocURI>
http://192.168.8.20:50000
</LocURI>
</Target>
<Source>
<LocURI>
IMEI:358240030276208
</LocURI>
<LocName>
test1
</LocName>
</Source>
<Meta>
<MaxMsgSize xmlns="syncml:metinf">
65535
</MaxMsgSize>
</Meta>
</SyncHdr>
<SyncBody>
<Status>
<CmdID>
1
</CmdID>
<MsgRef>
3
</MsgRef>
<CmdRef>
0
</CmdRef>
<Cmd>
SyncHdr
</Cmd>
<TargetRef>
IMEI:358240030276208
</TargetRef>
<SourceRef>
http://192.168.8.20:50000
</SourceRef>
<Data>
200
</Data>
</Status>
<Status>
<CmdID>
2
</CmdID>
<MsgRef>
3
</MsgRef>
<CmdRef>
3
</CmdRef>
<Cmd>
Sync
</Cmd>
<TargetRef>
./C:Contacts.cdb
</TargetRef>
<SourceRef>
./card
</SourceRef>
<Data>
200
</Data>
</Status>
<Status>
<CmdID>
3
</CmdID>
<MsgRef>
3
</MsgRef>
<CmdRef>
4
</CmdRef>
<Cmd>
Replace
</Cmd>
<TargetRef>
69
</TargetRef>
<Data>
415
</Data>
</Status>
<Final/>
</SyncBody>
</SyncML>