[sync] SyncML SQL backend

Eric Persson eric at persson.tm
Tue Apr 1 09:46:01 UTC 2008


Karsten Fourmont wrote:
> Hi,
> 
> the first sync packet seems to work fine: auth stuff an such is working. 
> So the hardest part, getting the systems to talk to each other is 
> already done :-)
> 
> Maybe the problem comes from the encoding of the CALENDAR date as 
> created by your app? Can you post the actual XML response created by the 
> server for the two requests?

Hi,
thanks for your response, I tried deleteing the activity found on the
server, but I get the same problem anyway. I figured if it was the
dateformat, it should go away if I deleted it, but no change.

I set the funambol client to work in xml instead of wbxml, same problem
though, but the messages are a bit more readable. See the debug output
below.

Also for two consecutive requests, any ideas?

I will try set up the phpunit stuff, and run the tests to see if they
give me any more input.

Thanks in advance,
   Eric


[31-Mar-2008 19:51:46] ---------------------------NEW
REQUEST----------------------------------
[31-Mar-2008 19:51:46] '<SyncML>
     <SyncHdr>
         <VerDTD>1.1</VerDTD>
         <VerProto>SyncML/1.1</VerProto>
         <SessionID>12345678</SessionID>
         <MsgID>1</MsgID>
         <Target>

<LocURI>http://localhost/dev/horde/horde_client/rpc.php</LocURI>
         </Target>
         <Source>
             <LocURI>funambol</LocURI>
         </Source>
         <Cred>
             <Meta>
                 <Type xmlns="syncml:metinf">syncml:auth-basic</Type>
             </Meta>
             <Data>ZXJpYzpwYXNzd29yZA==</Data>
         </Cred>
	<Meta>
             <MaxMsgSize>250000</MaxMsgSize>
             <MaxObjSize>4000000</MaxObjSize>
         </Meta>
     </SyncHdr>
     <SyncBody>
     <Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target><LocURI>calendar</LocURI></Target>
<Source><LocURI>calendar</LocURI></Source>
<Meta>
<Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>1206985906541</Next>
</Anchor>
</Meta>
</Item>
</Alert>

         <Final/>
     </SyncBody>
</SyncML>
'
[31-Mar-2008 19:51:46] Backend of class SyncML_Backend_Easy_SQL created
/ /mnt/storage/dev/horde/framework/SyncML/SyncML/Backend.php / 251
[31-Mar-2008 19:51:46] SyncML_ContentHandler - process: <SyncML>
     <SyncHdr>
         <VerDTD>1.1</VerDTD>
         <VerProto>SyncML/1.1</VerProto>
         <SessionID>12345678</SessionID>
         <MsgID>1</MsgID>
         <Target>

<LocURI>http://localhost/dev/horde/horde_client/rpc.php</LocURI>
         </Target>
         <Source>
             <LocURI>funambol</LocURI>
         </Source>
         <Cred>
             <Meta>
                 <Type xmlns="syncml:metinf">syncml:auth-basic</Type>
             </Meta>
             <Data>ZXJpYzpwYXNzd29yZA==</Data>
         </Cred>
	<Meta>
             <MaxMsgSize>250000</MaxMsgSize>
             <MaxObjSize>4000000</MaxObjSize>
         </Meta>
     </SyncHdr>
     <SyncBody>
     <Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target><LocURI>calendar</LocURI></Target>
<Source><LocURI>calendar</LocURI></Source>
<Meta>
<Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>1206985906541</Next>
</Anchor>
</Meta>
</Item>
</Alert>

         <Final/>
     </SyncBody>
</SyncML>
, application/vnd.syncml+xml; charset=UTF-8
[31-Mar-2008 19:51:46] New session created:
e2cd436c2a3a9f5e454691af6352e3f9 /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/SyncHdr.php / 35
[31-Mar-2008 19:51:46] checkAuthorization: , eric:password, ,
syncml:auth-basic
[31-Mar-2008 19:51:46] checking auth for user=eric /
/mnt/storage/dev/horde/horde_client/Easy_SQL.php / 486
[31-Mar-2008 19:51:47] authorized=1 version=1 msgid=1 source=funambol
target=http://localhost/dev/horde/horde_client/rpc.php user=eric
charset=UTF-8 wbxml= /
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 447
[31-Mar-2008 19:51:47] Command: SyncML_Command_Alert
[31-Mar-2008 19:51:47] Command: Alert
[31-Mar-2008 19:51:47] readSyncAnchors
[31-Mar-2008 19:51:47] SyncML: No info about previous syncs found for
device funambol and database calendar /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Alert.php / 86
[31-Mar-2008 19:51:47] alert: 200
[31-Mar-2008 19:51:47] two way sync
[31-Mar-2008 19:51:47] sync object:
[31-Mar-2008 19:51:47] Create new sync for calendar; synctype=201 /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Alert.php / 156
[31-Mar-2008 19:51:47] sync between 1206985907 - 0
[31-Mar-2008 19:51:47] created sync object: SyncML_Sync
[31-Mar-2008 19:51:47] vi kommer aldrig hit?
[31-Mar-2008 19:51:47] Command: SyncML_Command_Final
[31-Mar-2008 19:51:47] Command: Final
[31-Mar-2008 19:51:47] HandleFinal for state=0 /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 545
[31-Mar-2008 19:51:47] Received Final from client. /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Final.php / 31
[31-Mar-2008 19:51:47] Sending Final to client. /
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 514
[31-Mar-2008 19:51:47] SyncML: return message completed /
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 549
[31-Mar-2008 19:51:47] Finished at 2008-03-31 19:51:47. Packet logged in
/tmp/sync/syncml_server_12.xml /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Backend.php / 824
[31-Mar-2008 19:51:47] Any errors?
[31-Mar-2008 19:51:47] <?xml version="1.0" encoding="UTF-8"?><SyncML
xmlns="syncml:syncml1.1"><SyncHdr><VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>12345678</SessionID><MsgID>1</MsgID><Target><LocURI>funambol</LocURI><LocName>eric</LocName></Target><Source><LocURI>http://localhost/dev/horde/horde_client/rpc.php</LocURI></Source><Meta><MaxMsgSize 

xmlns="syncml:metinf">1000000</MaxMsgSize><MaxObjSize
xmlns="syncml:metinf">31000</MaxObjSize></Meta></SyncHdr><SyncBody><Status><CmdID>1</CmdID><MsgRef>1</MsgRef><CmdRef>0</CmdRef><Cmd>SyncHdr</Cmd><TargetRef>http://localhost/dev/horde/horde_client/rpc.php</TargetRef><SourceRef>funambol</SourceRef><Data>212</Data></Status><Status><CmdID>2</CmdID><MsgRef>1</MsgRef><CmdRef>1</CmdRef><Cmd>Alert</Cmd><TargetRef>calendar</TargetRef><SourceRef>calendar</SourceRef><Data>508</Data><Item><Data><Anchor 

xmlns="syncml:metinf"><Next>1206985906541</Next></Anchor></Data></Item></Status><Alert><CmdID>3</CmdID><Data>201</Data><Item><Target><LocURI>calendar</LocURI></Target><Source><LocURI>calendar</LocURI></Source><Meta><Anchor 

xmlns="syncml:metinf"><Last>0</Last><Next>1206985907</Next></Anchor><MaxObjSize 

xmlns="syncml:metinf">31000</MaxObjSize></Meta></Item></Alert><Get><CmdID>4</CmdID><Meta><Type 

xmlns="syncml:metinf">application/vnd.syncml-devinf+xml</Type></Meta><Item><Target><LocURI>./devinf11</LocURI></Target></Item></Get><Final></Final></SyncBody></SyncML>
[31-Mar-2008 19:51:47] ---------------------------------END OF
REQUEST------------------------


[31-Mar-2008 19:55:00] ---------------------------NEW
REQUEST----------------------------------
[31-Mar-2008 19:55:00] '<SyncML>
     <SyncHdr>
         <VerDTD>1.1</VerDTD>
         <VerProto>SyncML/1.1</VerProto>
         <SessionID>12345678</SessionID>
         <MsgID>1</MsgID>
         <Target>

<LocURI>http://localhost/dev/horde/horde_client/rpc.php</LocURI>
         </Target>
         <Source>
             <LocURI>funambol</LocURI>
         </Source>
         <Cred>
             <Meta>
                 <Type xmlns="syncml:metinf">syncml:auth-basic</Type>
             </Meta>
             <Data>ZXJpYzpwYXNzd29yZA==</Data>
         </Cred>
	<Meta>
             <MaxMsgSize>250000</MaxMsgSize>
             <MaxObjSize>4000000</MaxObjSize>
         </Meta>
     </SyncHdr>
     <SyncBody>
     <Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target><LocURI>calendar</LocURI></Target>
<Source><LocURI>calendar</LocURI></Source>
<Meta>
<Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>1206986100235</Next>
</Anchor>
</Meta>
</Item>
</Alert>

         <Final/>
     </SyncBody>
</SyncML>
'
[31-Mar-2008 19:55:00] Backend of class SyncML_Backend_Easy_SQL created
/ /mnt/storage/dev/horde/framework/SyncML/SyncML/Backend.php / 251
[31-Mar-2008 19:55:00] SyncML_ContentHandler - process: <SyncML>
     <SyncHdr>
         <VerDTD>1.1</VerDTD>
         <VerProto>SyncML/1.1</VerProto>
         <SessionID>12345678</SessionID>
         <MsgID>1</MsgID>
         <Target>

<LocURI>http://localhost/dev/horde/horde_client/rpc.php</LocURI>
         </Target>
         <Source>
             <LocURI>funambol</LocURI>
         </Source>
         <Cred>
             <Meta>
                 <Type xmlns="syncml:metinf">syncml:auth-basic</Type>
             </Meta>
             <Data>ZXJpYzpwYXNzd29yZA==</Data>
         </Cred>
	<Meta>
             <MaxMsgSize>250000</MaxMsgSize>
             <MaxObjSize>4000000</MaxObjSize>
         </Meta>
     </SyncHdr>
     <SyncBody>
     <Alert>
<CmdID>1</CmdID>
<Data>200</Data>
<Item>
<Target><LocURI>calendar</LocURI></Target>
<Source><LocURI>calendar</LocURI></Source>
<Meta>
<Anchor xmlns="syncml:metinf">
<Last>0</Last>
<Next>1206986100235</Next>
</Anchor>
</Meta>
</Item>
</Alert>

         <Final/>
     </SyncBody>
</SyncML>
, application/vnd.syncml+xml; charset=UTF-8
[31-Mar-2008 19:55:00] Existing session continued:
e2cd436c2a3a9f5e454691af6352e3f9 /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/SyncHdr.php / 43
[31-Mar-2008 19:55:00] authorized=1 version=1 msgid=1 source=funambol
target=http://localhost/dev/horde/horde_client/rpc.php user=eric
charset=UTF-8 wbxml= /
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 447
[31-Mar-2008 19:55:00] Command: SyncML_Command_Alert
[31-Mar-2008 19:55:00] Command: Alert
[31-Mar-2008 19:55:00] readSyncAnchors
[31-Mar-2008 19:55:00] SyncML: No info about previous syncs found for
device funambol and database calendar /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Alert.php / 86
[31-Mar-2008 19:55:00] alert: 200
[31-Mar-2008 19:55:00] two way sync
[31-Mar-2008 19:55:00] sync object: SyncML_Sync
[31-Mar-2008 19:55:00] vi kommer aldrig hit?
[31-Mar-2008 19:55:00] Command: SyncML_Command_Final
[31-Mar-2008 19:55:00] Command: Final
[31-Mar-2008 19:55:00] HandleFinal for state=1 /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 545
[31-Mar-2008 19:55:00] server create sync output for syncType=calendar /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 264
[31-Mar-2008 19:55:00] device default
[31-Mar-2008 19:55:00] using default device class /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Device.php / 47
[31-Mar-2008 19:55:00] getMaxMsgSize: 250000  getOutputSize: 1333 msg
trailer len: 150
[31-Mar-2008 19:55:00] Compiling server changes from 1970-01-01 01:00:00
to 2008-03-31 19:51:47 /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 296
[31-Mar-2008 19:55:00] Sync.php - retrieveChanges
[31-Mar-2008 19:55:00] getServerChanges from 1970-01-01 01:00:00 to
2008-03-31 19:51:47
[31-Mar-2008 19:55:00] fix _trackDeletes
[31-Mar-2008 19:55:00] Sync.php - retrieveChanges - Finished
[31-Mar-2008 19:55:00] sending 0 server changes for syncType=calendar /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 338
[31-Mar-2008 19:55:00] number of changes sent?
[31-Mar-2008 19:55:00] retrieveEntry: Start handling replaces adds and
stuff:array (
)
[31-Mar-2008 19:55:00] Received Final from client. /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Final.php / 31
[31-Mar-2008 19:55:00] Sending Final to client. /
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 514
[31-Mar-2008 19:55:00] SyncML: return message completed /
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 549
[31-Mar-2008 19:55:00] Finished at 2008-03-31 19:55:00. Packet logged in
/tmp/sync/syncml_server_13.xml /
/mnt/storage/dev/horde/framework/SyncML/SyncML/Backend.php / 824
[31-Mar-2008 19:55:00] Any errors?
[31-Mar-2008 19:55:00] <?xml version="1.0" encoding="UTF-8"?><SyncML
xmlns="syncml:syncml1.1"><SyncHdr><VerDTD>1.1</VerDTD><VerProto>SyncML/1.1</VerProto><SessionID>12345678</SessionID><MsgID>1</MsgID><Target><LocURI>funambol</LocURI><LocName>eric</LocName></Target><Source><LocURI>http://localhost/dev/horde/horde_client/rpc.php</LocURI></Source><Meta><MaxMsgSize 

xmlns="syncml:metinf">1000000</MaxMsgSize><MaxObjSize
xmlns="syncml:metinf">31000</MaxObjSize></Meta></SyncHdr><SyncBody><Status><CmdID>1</CmdID><MsgRef>1</MsgRef><CmdRef>0</CmdRef><Cmd>SyncHdr</Cmd><TargetRef>http://localhost/dev/horde/horde_client/rpc.php</TargetRef><SourceRef>funambol</SourceRef><Data>200</Data></Status><Status><CmdID>2</CmdID><MsgRef>1</MsgRef><CmdRef>1</CmdRef><Cmd>Alert</Cmd><TargetRef>calendar</TargetRef><SourceRef>calendar</SourceRef><Data>508</Data><Item><Data><Anchor 

xmlns="syncml:metinf"><Next>1206986100235</Next></Anchor></Data></Item></Status><Alert><CmdID>3</CmdID><Data>201</Data><Item><Target><LocURI>calendar</LocURI></Target><Source><LocURI>calendar</LocURI></Source><Meta><Anchor 

xmlns="syncml:metinf"><Last>0</Last><Next>1206985907</Next></Anchor><MaxObjSize 

xmlns="syncml:metinf">31000</MaxObjSize></Meta></Item></Alert><Get><CmdID>4</CmdID><Meta><Type 

xmlns="syncml:metinf">application/vnd.syncml-devinf+xml</Type></Meta><Item><Target><LocURI>./devinf11</LocURI></Target></Item></Get><Sync><CmdID>5</CmdID><Target><LocURI>calendar</LocURI></Target><Source><LocURI>calendar</LocURI></Source></Sync><Final></Final></SyncBody></SyncML>
[31-Mar-2008 19:55:00] ---------------------------------END OF
REQUEST------------------------





More information about the sync mailing list