[sync] Horde SyncML server: new version 0.0.5!

Karsten Fourmont fourmont at gmx.de
Mon Jul 24 13:01:23 PDT 2006


Hi,

I finally found the time to do some serious refactoring of the whole 
SyncML code base.

This was possible as created a test script that allows to verify that 
changes you make during refactoring (hopefully) don't change the 
behavior of the server.

For the test script and a brief introduction on how to create test cases 
   see http://wiki.horde.org/SyncHowTo

I'd highly appreciate if somebody could provide test cases for other 
devices than the synthesis client.

The aim of the refactoring was to provide a cleaner seperation between 
XML parsing, XML creation and actual business logic.

XML creation is now limited to one (albeit length) XMLOutput.php file. 
XML parsing is done as before in various startElement/endElement member 
functions. However these functions are now for extracting the xml data 
and putting it into the member variables _only_. They do no longer 
contain any business logic.

Business logic is now primary contained in a SyncML_Handler class in 
SyncML.php and handleCommand member functions in the various command 
classes. There's also a Sync class (SyncML_Sync) which holds information 
about one database sync (for example there can be syncs for tasks and 
contacts active and the same time).

It's still not completly polished but the final structure is all there now.

There are two new features with this version:

1) Improved spec-conformance for Status response.
Hopefully this improves things for the SE K750i. Andy, can you give it a 
try?

2)
Rudimentary support for auth-md5 authentication:
syncml:auth-md5 only transfers hash values of passwords. Currently the 
syncml:auth-md5 hash scheme is not supported by the Horde Auth backend. 
So we can't use horde to do authentication. Instead there's a very crude 
direct manual hook: To allow authentication for a user 'dummy' with 
password 'sync', run
php -r 'print base64_encode(pack("H*",md5("dummy:sync")));'
from the command line. Then create an entry like
   'dummy' => 'ZD1ZeisPeQs0qipHc9tEsw=='
in the users array in backend.php around line 384 where the value is the 
command line output. This user/password combination is then accepted for 
md5-auth.
syncml:auth-md5 is used by Sony Ericsson M600i. Erik, does this help?

To get the new version you need cvs versions of the SyncML and RPC 
packages. A current services/portal/syncml.php is also helpful for 
debugging and test cases.

Feedback is very welcome: the code has changed very much so debugging 
with phones known to work (or not) is needed.

That's it for the moment. I'll try to write some more stuff about the 
test cases in the next days.

Cheers,
  Karsten


More information about the sync mailing list