[horde] Sync with Funambol

Paul Faure faurep at agr.gc.ca
Tue Oct 28 18:25:08 UTC 2008


Hi All,

Sync between Outlook and Horde used to work perfectly back with horde
1.1.
I have recently upgraded to horde 1.2 and now when I create a new
contact on a client and sync, it gives me the error below:

==> log.txt <==
DEBUG:  Backend of class syncml_backend_horde created
DEBUG:  Started at 2008-10-28 14:00:16. Packet logged
in /tmp/sync/client_25701.xml
DEBUG:  Existing session continued: 3853582193943de92a9c4b7f683a0b8f
DEBUG:  Authenticated: yes; version: 1.1; message ID: 2; source URI:
iph-PpMbXDksxKOlkU0oFXOIjQ==; target URI:
https://HOSTNAME:443/horde/rpc.php; user: USER; charset: UTF-8; wbxml:
no
DEBUG:  Using default device class
DEBUG:  Handling <Add> sent from client
DEBUG:  Using default device class
NOTICE: Adding client entry to server: already exists with server id
3e37b9140457c0f37039de9227cb4915
DEBUG:  SQL Query by SyncML_Backend_Horde::_getSuid(): SELECT
syncml_suid FROM horde_syncml_map WHERE syncml_syncpartner = ? AND
syncml_db = ? AND syncml_uid = ? AND syncml_cuid = ?, values:
iph-PpMbXDksxKOlkU0oFXOIjQ==, contacts, USER, 571
DEBUG:  SQL Query by SyncML_Backend_Horde::createUidMap(): INSERT INTO
horde_syncml_map (syncml_suid, syncml_timestamp, syncml_syncpartner,
syncml_db, syncml_uid, syncml_cuid) VALUES (?, ?, ?, ?, ?, ?), values:
3e37b9140457c0f37039de9227cb4915, 0, iph-PpMbXDksxKOlkU0oFXOIjQ==,
contacts, USER, 571
DEBUG:  Added client entry as 3e37b9140457c0f37039de9227cb4915
DEBUG:  Received <Final> from client.
DEBUG:  Handle <Final> for state Sync
DEBUG:  Creating <Sync> output for server changes in database card
DEBUG:  Using default device class
DEBUG:  Compiling server changes from 2008-10-26 23:09:06 to 2008-10-28
14:00:13
DEBUG:  SQL Query by SyncML_Backend_Horde::_getChangeTS(): SELECT
syncml_timestamp FROM horde_syncml_map WHERE syncml_syncpartner = ? AND
syncml_db = ? AND syncml_uid = ? AND syncml_suid = ?, values:
iph-PpMbXDksxKOlkU0oFXOIjQ==, contacts, USER,
20080707114252.193522rqn30xy740 at DOMAIN
DEBUG:  SQL Query by SyncML_Backend_Horde::_getCuid(): SELECT
syncml_cuid FROM horde_syncml_map WHERE syncml_syncpartner = ? AND
syncml_db = ? AND syncml_uid = ? AND syncml_suid = ?, values:
iph-PpMbXDksxKOlkU0oFXOIjQ==, contacts, USER,
20080707114252.193522rqn30xy740 at DOMAIN
DEBUG:  Modifying on client from db contacts, client id 488 -> server id
20080707114252.193522rqn30xy740 at DOMAIN
DEBUG:  Sending 1 server changes for client URI card
DEBUG:  Sending replace from server:
20080707114252.193522rqn30xy740 at DOMAIN
DEBUG:  Using default device class
DEBUG:  Sending <Final> to client
DEBUG:  Return message completed
DEBUG:  Finished at 2008-10-28 14:00:16. Packet logged
in /tmp/sync/server_25701.xml

This happens with both the iPhone and Outlook with the funambol client
(version 6.6 and 7.0).
Updating an entry on the client works well.

I tracked it down to failing in this section of code:
horde-webmail-1.2/lib/SyncML/Backend/Horde.php:373

        $suid = $registry->call(
            $database . '/import',
            array($content,
                  $contentType,
                  SyncML_Backend::getParameter($databaseURI, 'source')));

        if (!is_a($suid, 'PEAR_Error')) {
           ...
        } else {
            // Failed import. Maybe the entry is already there. Check if a
            // guid is returned:
            if ($suid->getDebugInfo()) {
                $suid = $suid->getDebugInfo();
                $this->logMessage(
                    'Adding client entry to server: already exists with server id ' . $suid,
                    __FILE__, __LINE__, PEAR_LOG_NOTICE);
                ...


/tmp/sync/client_25701.xml:
<?xml version="1.0" encoding="UTF-8"?>
<SyncML>
<SyncHdr><VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>1225216800</SessionID>
<MsgID>2</MsgID>
<Target><LocURI>https://HOSTNAME:443/horde/rpc.php</LocURI>
</Target>
<Source><LocURI>iph-PpMbXDksxKOlkU0oFXOIjQ==</LocURI>
</Source>
</SyncHdr>
<SyncBody><Status><CmdID>1</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>0</CmdRef>
<Cmd>SyncHdr</Cmd>
<TargetRef>https://HOSTNAME:443/horde/rpc.php</TargetRef>
<SourceRef>iph-PpMbXDksxKOlkU0oFXOIjQ==</SourceRef>
<Data>200</Data>
</Status>
<Status><CmdID>2</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>3</CmdRef>
<Cmd>Alert</Cmd>
<TargetRef>card</TargetRef>
<SourceRef>addressbook</SourceRef>
<Data>200</Data>
<Item><Data><Anchor xmlns="syncml:metinf"><Next>1225216813</Next>
</Anchor>
</Data>
</Item>
</Status>
<Status><CmdID>4</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>4</CmdRef>
<Cmd>Get</Cmd>
<Data>200</Data>
</Status>
<Results><CmdID>3</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>4</CmdRef>
<Meta><Type xmlns="syncml:metinf">application/vnd.syncml-devinf+xml</Type>
</Meta>
<Item><Source><LocURI>./devinf11</LocURI>
</Source>
<Data><DevInf xmlns="syncml:devinf"><VerDTD>1.1</VerDTD>
<Man>Funambol Inc.</Man>
<Mod>iPhone</Mod>
<OEM>Open Source</OEM>
<SwV>7.0.3</SwV>
<DevID>iph-PpMbXDksxKOlkU0oFXOIjQ==</DevID>
<DevTyp>iPhone</DevTyp>
<UTC/><SupportNumberOfChanges/><DataStore><SourceRef>addressbook</SourceRef>
<Rx-Pref><CTType>text/x-vcard</CTType>
<VerCT>2.1</VerCT>
</Rx-Pref>
<Rx><CTType>text/x-vcard</CTType>
<VerCT></VerCT>
</Rx>
<Tx-Pref><CTType>text/x-vcard</CTType>
<VerCT>2.1</VerCT>
</Tx-Pref>
<Tx><CTType>text/x-vcard</CTType>
<VerCT></VerCT>
</Tx>
<SyncCap><SyncType>2</SyncType>
<SyncType>1</SyncType>
<SyncType>5</SyncType>
<SyncType>3</SyncType>
</SyncCap>
</DataStore>
</DevInf>
</Data>
</Item>
</Results>
<Sync><CmdID>5</CmdID>
<Target><LocURI>card</LocURI>
</Target>
<Source><LocURI>addressbook</LocURI>
</Source>
<Add><CmdID>6</CmdID>
<Meta><Type xmlns="syncml:metinf">text/x-vcard</Type>
</Meta>
<Item><Source><LocURI>571</LocURI>
</Source>
<Data><![CDATA[BEGIN:VCARD^M
VERSION:2.1^M
N:;Test a;;;^M
BDAY:^M
NOTE:^M
TEL;VOICE;WORK:^M
TEL;WORK;FAX:^M
TEL;WORK;PREF:^M
TEL;VOICE;HOME:^M
TEL;HOME;FAX:^M
TEL;FAX:^M
TEL;CAR:^M
TEL;CELL:^M
TEL;VOICE:^M
TEL;PAGER:^M
TEL;PREF;VOICE:^M
URL;WORK:^M
URL;HOME:^M
URL:^M
EMAIL;INTERNET:^M
EMAIL;INTERNET;HOME:^M
EMAIL;INTERNET;WORK:^M
TITLE:^M
NICKNAME:^M
ORG:;;^M
ADR;HOME:;;;;;;^M
ADR:;;;;;;^M
ADR;WORK:;;;;;;^M
PHOTO:^M
END:VCARD^M
]]></Data>
</Item>
</Add>
</Sync>
<Final/></SyncBody>
</SyncML>



Thanks for your help,
Paul

-- 
Paul Faure, B. Eng
WebServices, Agriculture and Agri-Food Canada
faurep at agr.gc.ca
613.759.6104


More information about the horde mailing list