OX SyncML
SyncML is the industry standard for synchronization with mobile devices.
It is part of the
Open Mobile Alliance (OMA). The old specifications up to version 1.1 of SyncML can be found
here.
The new specifications for SyncML version 1.2 are now developed by two working groups (Data Synchronization and Device Management). The Data Synchronization documents for SyncML v1.2 (SyncML Sync Protocol, SyncML Presentation Protocol, Data Object specifications,...) can be found
here. The Common Specifications for SyncML v1.2, which describe the binding requirements for communicating SyncML over various transports (HTTP, OBEX,...), can be found
here.
Requirements
-
latest developer version of Open-Xchange
-
OX SyncML
-
ant
-
Java JDK >= 1.4.2
-
a device that supports SyncML
How to get it
Check out the current version from the Repository:
svn co http://www.open-xchange.org/oxtensions/syncml/trunk OXSyncML
Notice the revision number it prints. We will need it to reproduce any problems you might have.
Installation
cd OXSyncML mkdir lib
Now copy all jar files from your Open-Xchange 0.8.0-[CURRENT_VERSION] installation to ./lib/ and create the war file using ant. For this purpose the "web.xml" file must be adapted to your OX installation path. Look for the prefix: "$OX Installation Path$" and replace it properly.
ant war
Furthermore a few tables must be added to your open-xchange sql database. For help, you may use the script below:
begin;
create table syncml_principals (
principal integer,
username varchar(32),
source varchar(64),
primary key (principal)
);
create table syncml_anchors (
principal integer,
database integer,
client_anchor varchar(64),
server_anchor integer,
last_sync timestamp with time zone,
primary key (principal, database),
foreign key (principal) references syncml_principals on delete cascade on update cascade
);
create table syncml_ids (
principal integer,
id_client varchar(32),
id_ox integer,
database integer,
db_name varchar(64),
primary key (principal, id_ox),
foreign key (principal) references syncml_principals on delete cascade on update cascade
);
create table syncml_withheld (
principal integer,
database integer,
oxid integer,
op integer,
primary key (principal, oxid),
foreign key (principal) references syncml_principals on delete cascade on update cascade
);
create table syncml_softdeleted (
principal integer,
id_ox integer,
primary key (principal),
foreign key (principal) references syncml_principals on delete cascade on update cascade
);
create table syncml_datastores (
principal integer,
sourceref varchar(32),
maxguidsize integer,
sharedmem integer,
maxmem integer,
maxid integer,
synctype_1 integer,
synctype_2 integer,
synctype_3 integer,
synctype_4 integer,
synctype_5 integer,
synctype_6 integer,
synctype_7 integer,
displayname varchar(32),
primary key (principal, sourceref),
foreign key (principal) references syncml_principals on delete cascade on update cascade
);
CREATE TABLE syncml_rxprefs (
principal integer,
sourceref varchar(32),
cttype varchar(16),
verct varchar(8),
primary key (principal, sourceref),
foreign key (principal, sourceref) references syncml_datastores on delete cascade on update cascade);
CREATE TABLE syncml_txprefs (
principal integer,
sourceref varchar(32),
cttype varchar(16),
verct varchar(8),
primary key (principal, sourceref),
foreign key (principal, sourceref) references syncml_datastores on delete cascade on update cascade);
CREATE TABLE syncml_tempguids (
principal integer,
database integer,
guid integer,
tempguid integer,
primary key (principal, database, guid),
foreign key (principal) references syncml_principals on delete cascade on update cascade);
commit;
Last but not least, create the file with the full path "/var/opt/openexchange/syncml/savedCTTypes.dat". Pay attention to set the correct access to it via the chmod command, e.g. chmod 666 /var/opt/openexchange/syncml/savedCTTypes.dat
Afterwards you should deploy the "syncml.war" file your tomcat and restart it.
That's it
Synchronization
The URI is something like
http://OX:PORT_OF_TOMCAT/syncml/
As database name, please select the name of the folder you wish to synchronize. If you have multiple folders with the same name, you have to specify the full path, e. g. "Private/My Tasks". As a new feature standard mapping names have been added to address standard folders directly: events <-> My Events, tasks <-> My Tasks and contacts <-> My Contacts
Not supported yet
-
md5 authentification
-
Soft Delete
-
Server Alerted Sync
-
Mails
Comments and any kind of response to this topic is welcome, especially reports of what phone models work and what don't. Please add the name of your phone to the end of this page, or send an e-mail to the following address:
<syncml AT SPAMFREE open-xchange DOT org>
Troubleshooting
Some tips on problems you might encounter duing the "ant war" stage.
Missing replaceregexp task
BUILD FAILED /root/OXSyncML/build.xml:47: Could not create task or type of type: replaceregexp.
Make sure the ant optional tasks are installed. If you are using Fedora with yum configured to use the jpackage.org repositry, this is as simple as:
yum install ant-nodeps ant-apache-regexp
Can't find catalina-ant package
BUILD FAILED /root/OXSyncML/build.xml:11: taskdef class org.apache.catalina.ant.DeployTask cannot be found
Set the CLASSPATH variable so that ant can find the catalina-ant5.jar file. e.g.
export CLASSPATH=/usr/share/java/catalina-ant5.jar
Compile error I
compile:
[javac] Compiling 1 source file to /root/OXSyncML/bin
[javac] /root/OXSyncML/src/com/openexchange/syncml/commands/Get.java:66: cannot access javax.servlet.http.HttpServlet
[javac] file javax/servlet/http/HttpServlet.class not found
[javac] SyncMLServlet.log("Receiving Get", 10);
[javac] ^
[javac] 1 error
BUILD FAILED
/root/OXSyncML/build.xml:25: Compile failed; see the compiler error output for details.
Make sure your CLASSPATH variable includes the location of servletapi5.jar. e.g.
export CLASSPATH=/usr/share/java/servletapi5.jarIf you previously had problems with the catalina-ant5.jar file, you might want to use this instead:
export CLASSPATH=/usr/share/java/catalina-ant5.jar:/usr/share/java/servletapi5.jar
Compile error II
[javac] /download/ox/OXSyncML/src/com/openexchange/syncml/commands/Replace.java:233: cannot resolve symbol
[javac] symbol : constructor ICal2OXObject (java.util.TimeZone)
[javac] location: class com.openexchange.tools.ical.ICal2OXObject
[javac] def2ox = new ICal2OXObject(Message.getTimeZone());
[javac] ^
[javac] 3 errors
BUILD FAILED
/download/ox/OXSyncML/build.xml:36: Compile failed; see the compiler error output for details.
Use the latest OX-Release, because the ICal2OXObject has changed and got a different constructor.
Can't connect with SyncML Servlet
This error occurs when trying to access the SyncML Servlet using the Jk-Connector Apache Module. In this case the Server URL MUST contain an ending "/", eg: http://[OX]/syncml/ Make sure you remember to add the /syncml/ URI to your workers2.properties file if you are connecting through apache.On some devices, especially Nokia 80ies and 60ies series, the ending "/" is cut off by default. To force such a device to keep the ending "/" add some text right after the "/": eg: http://[OX]/syncml/nokia
Database Driver not found
javax.servlet.ServletException: Driver for database not found: org.postgresql.Driver
at com.openexchange.tools.webdav.OXServlet.syncInit(OXServlet.java:193)
at com.openexchange.tools.webdav.OXServlet.init(OXServlet.java:128)
Check out your ./lib directory for the following files : activation.jar comfiretools.jar intranet.jar mail.jar nas.jar postgresql.jar Phones
Motorola V550
via GPRS and German vodafone: Setup is straight forward. Folders to synchronize: Kontakte, Kalender . Currently, 14-07-05 the phone syncronizes with OXSyncML Version 75 and Open-Xchange 0.8.0-4. The earlier reboots of the mobile have been resolved. However, there are still some issues with VCARD (i.e. contact) records.Siemens S65 v43
via GPRS and German T-Mobile: setup is also easy. Folders which currently work: Aufgaben (My Tasks) and Termine (Appointments) also newest versions.Nokia 80er and 60er series
The server URL MUST contain an ending "/" to properly access the SyncML Servlet. To force Nokia devices to keep the ending "/" add some text right after the "/": eg: http://[OX]/syncml/nokiaIf a https connection (on Nokia e61, others may have the same problem) fails with a message like "Cannot connect server", check if the certificate and/or the ca certificate is installed at your phone.
SonyEricsson K750i
Normal http connection works smoothly. Only had problems with https and a self signed certificate, because my K750i didn't accept the connection
Settings:
Connection: GPRS (Vodafone)
Server address: http://[OX]/syncml/
Calendar Database: Kalender (DE)
Contacts Database: Kontakte (DE)
Tasks Database: Aufgaben (DE)
SonyEricsson P910i
Absolute piece of cake. Even with https secure connection. Quick too. Even faster than normal Outlook Sync!With the P800 the synced does not work very well. Perhaps it works with the latest firmware version.
Should work just fine with P900 too.
(In fact, I'll be using the syncml through P910 to keep my Outlook contacts and calendar sync'd instead of OxLook as I just can't get it working!
)
PalmOne Treo 650
Works like a charm too, using the Client at http://www.synthesis.ch/dl_client.php?lang=e (HTTPS not tested yet, will report here asap.)
Settings: (for connection through apache, so port numbers not required)
Server address: https://ox.server.com/syncml/
Calendar Database: Private/Calendar
Contacts Database: Private/Contacts
Tasks Database: Private/Tasks
