[sync] SyncML SQL backend

Eric Persson eric at persson.tm
Sun Mar 30 21:07:00 UTC 2008


Hi,

I used the example sqlbackend to start writing my own, seems to work 
well, other than the tiny problem, that it doesnt work... yet. :)

I try to debug it with the Funambol Java Demo Client and find the 
problem, my current problem is I get String Index out of range - 9, and 
from I've read out from google, this doesnt tell me anything.

I have gone through the code debugging and tried to find the problem, 
but not yet. If I clean the sessions and sync 1 time, it doesnt give me 
a lot, but on the second sync I get somewhat more, It goes in to 
Sync.php -> createSyncOutput and starts looping through added($adds) 
items from the servers(theres 1 that I created). But then nothing more, 
and I dont get the event in the demo client(probably due to the error).

I'll attach some error logging/debug output further down.

Any hints would be greatly appreciated, I use the code in cvs from 
saturday 2008-03-29. Are there any better tools to debug with than the 
funambol java demo client? Any other hints that might help the debugging 
part, or suggestions?

Btw, modified the wiki a bit on the code example, since raw_post_data 
wasnt available for me, and there was a missing;
http://wiki.horde.org/SyncMLCustomBackend

Thanks in advance for any help.
   Eric

Debug output below, 2 consecutive requests, if helpful for anyone. 
Theres a few extra remarks that i did as well.

-----------------------------------------
[30-Mar-2008 23:04:17] ---------------------------NEW 
REQUEST----------------------------------
[30-Mar-2008 23:04:17] '\000\000j
-//SYNCML//DTD SyncML 1.0//ENmlq1.1\000rSyncML/1.1\000e12345678\000[1\000nWhttp://localhost/dev/horde/horde_client/rpc.php\000gWfunambol\000NZ\000Ssyncml:auth-basic\000\000\000OZXJpYzpwYXNzd29yZA==\000Z\000L250000\000U4000000\000\000\000kFK1\000O200\000TnWcalendar\000gWcalendar\000Z\000EJ0\000O1206911056850\000\000\000'
[30-Mar-2008 23:04:17] Backend of class SyncML_Backend_Easy_SQL created 
/ /mnt/storage/dev/horde/framework/SyncML/SyncML/Backend.php / 251
[30-Mar-2008 23:04:17] logFile: 1
[30-Mar-2008 23:04:17] SyncML_ContentHandler - process: 
[30-Mar-2008 23:04:17] New session created: 
e2cd436c2a3a9f5e454691af6352e3f9 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/SyncHdr.php / 35
[30-Mar-2008 23:04:17] checkAuthorization: , eric:password, , 
syncml:auth-basic
[30-Mar-2008 23:04:17] checking auth for user=eric / 
/mnt/storage/dev/horde/horde_client/Easy_SQL.php / 483
[30-Mar-2008 23:04:17] authorized=1 version=1 msgid=1 source=funambol 
target=http://localhost/dev/horde/horde_client/rpc.php user=eric 
charset=UTF-8 wbxml=1 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 447
[30-Mar-2008 23:04:17] Command: Alert
[30-Mar-2008 23:04:17] SyncML: No info about previous syncs found for 
device funambol and database calendar / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Alert.php / 86
[30-Mar-2008 23:04:17] alert: 200
[30-Mar-2008 23:04:17] two way sync
[30-Mar-2008 23:04:17] sync object:
[30-Mar-2008 23:04:17] Create new sync for calendar; synctype=201 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Alert.php / 156
[30-Mar-2008 23:04:17] created sync object: SyncML_Sync
[30-Mar-2008 23:04:17] Command: Final
[30-Mar-2008 23:04:17] HandleFinal for state=0 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 542
[30-Mar-2008 23:04:17] Received Final from client. / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Final.php / 31
[30-Mar-2008 23:04:17] Sending Final to client. / 
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 513
[30-Mar-2008 23:04:17] SyncML: return message completed / 
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 548
[30-Mar-2008 23:04:17] logFile: 2
[30-Mar-2008 23:04:17] Any errors?
[30-Mar-2008 23:04:17] 
[30-Mar-2008 23:04:17] ---------------------------------END OF 
REQUEST------------------------


[30-Mar-2008 23:04:18] ---------------------------NEW 
REQUEST----------------------------------
[30-Mar-2008 23:04:18] '\000\000j
-//SYNCML//DTD SyncML 1.0//ENmlq1.1\000rSyncML/1.1\000e12345678\000[1\000nWhttp://localhost/dev/horde/horde_client/rpc.php\000gWfunambol\000NZ\000Ssyncml:auth-basic\000\000\000OZXJpYzpwYXNzd29yZA==\000Z\000L250000\000U4000000\000\000\000kFK1\000O200\000TnWcalendar\000gWcalendar\000Z\000EJ0\000O1206911058666\000\000\000'
[30-Mar-2008 23:04:18] Backend of class SyncML_Backend_Easy_SQL created 
/ /mnt/storage/dev/horde/framework/SyncML/SyncML/Backend.php / 251
[30-Mar-2008 23:04:18] logFile: 1
[30-Mar-2008 23:04:18] SyncML_ContentHandler - process: 
[30-Mar-2008 23:04:18] Existing session continued: 
e2cd436c2a3a9f5e454691af6352e3f9 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/SyncHdr.php / 43
[30-Mar-2008 23:04:18] authorized=1 version=1 msgid=1 source=funambol 
target=http://localhost/dev/horde/horde_client/rpc.php user=eric 
charset=UTF-8 wbxml=1 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 447
[30-Mar-2008 23:04:18] Command: Alert
[30-Mar-2008 23:04:18] SyncML: No info about previous syncs found for 
device funambol and database calendar / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Alert.php / 86
[30-Mar-2008 23:04:18] alert: 200
[30-Mar-2008 23:04:18] two way sync
[30-Mar-2008 23:04:18] sync object: SyncML_Sync
[30-Mar-2008 23:04:18] Command: Final
[30-Mar-2008 23:04:18] HandleFinal for state=1 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 542
[30-Mar-2008 23:04:18] server create sync output for syncType=calendar / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 263
[30-Mar-2008 23:04:18] using default device class / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Device.php / 47
[30-Mar-2008 23:04:18] Compiling server changes from 1970-01-01 01:00:00 
to 2008-03-30 23:04:17 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 295
[30-Mar-2008 23:04:18] fix _trackDeletes
[30-Mar-2008 23:04:18] sending 1 server changes for syncType=calendar / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 337
[30-Mar-2008 23:04:18] add: 123 / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Sync.php / 394
[30-Mar-2008 23:04:18] before call to retreieve entry: 
SyncML_Backend_Easy_SQL
[30-Mar-2008 23:04:18] retrieveEntry: calendar
[30-Mar-2008 23:04:18] retrieveEntry: 'Activity from server.'
[30-Mar-2008 23:04:18] retrieveEntry device: SyncML_Device
[30-Mar-2008 23:04:18] logFile: 4
[30-Mar-2008 23:04:18] retrieveEntry: inside? SyncML_XMLOutput
[30-Mar-2008 23:04:18] retrieveEntry: Start handling replaces adds and 
stuff:array (
   123 => 0,
)
[30-Mar-2008 23:04:18] Received Final from client. / 
/mnt/storage/dev/horde/framework/SyncML/SyncML/Command/Final.php / 31
[30-Mar-2008 23:04:18] Sending Final to client. / 
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 513
[30-Mar-2008 23:04:18] SyncML: return message completed / 
/mnt/storage/dev/horde/framework/SyncML/SyncML.php / 548
[30-Mar-2008 23:04:18] logFile: 2
[30-Mar-2008 23:04:18] Any errors?
[30-Mar-2008 23:04:18] 
[30-Mar-2008 23:04:18] ---------------------------------END OF 
REQUEST------------------------


More information about the sync mailing list