SyncML bug with my custom server for the Replace command to the client
I develop a syncml server and I do not synchronize from the server to the client (nokia e71) for modified contacts. All the rest works except when I make a command replace towards the client for an existing localuid. The client returns me then the status 415 for this command (type or format of the datum is not corresponding) while the customer accepts the same datum for an addition (by a command add or replaces).
Has anybody already met this problem ?
Here are messages sent between the client and the server:
Server message with Replace command:
<?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><MsgRe开发者_开发问答f>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>
Client Message with a replace command status:
<?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>
精彩评论