|
|
|
Creating a simple Funambol connectorThis article will be about the problems I encountered as a beginner in writing a Funambol connector. It aims at avoiding simple stupind things that makes you loosing time. The article will be based on the 3.0 Beta 1 version of Funambol: there are some API changes between Beta 1 and Beta 2, so the following lines might be wrong for the last version. Vocabulary
The basic example: dummyFirst of all, to develop a connector, you will have at least to have a serious look at the dummy connector code (see the link for the CVS, tag funambol30b1). You can see there that this connector doesn't do many things and contains only 2 classes:
All the classes are packaged in a jar with the name of your connector (in my case: jcr-sync-0.0.1). The file to install on the Funambol DS server has an s4j extension and contains:
There are two solutions to implement your own connector afterwards: a copy-paste of the dummy connector and using this as a base for your connector, or understanding the dummy connector to create your connector. I choose the second solution and had to fight with this problem: I got a server error when I tried to create a SyncSource using my connector source type. Solving the problemTo solve this problem I had some tools:
First thing I tried was to locate the error: for this you can change the server logging preferences to print all the messages. This way you will be able to see quite exactly where it fails. However you won't be able to debug at this point in the code: then the idea is to sniff the messages between the admin program and the serveur. If you are using the bundle as I am, you just have to listen on the local interface for TCP messages on 8080 port. This way I could see one important point:The server was trying to guess if there wa already SyncSources with the same URI or name than the one I wanted to add. The problem was that these value were not set. Thus here are the conclusions:
Please check that you are reading the sources corresponding to funambol30b1 if you are using the 3.0 Beta 1 version of Funambol. The SyncContext doesn't exists in the Beta 1 but in the Beta 2: some of the SyncSource method signatures have changed
please remark the small '3x' CVS module name for the 3.0 sources: the rest is for previous versions
Important announcement: Join the Nuxeo team and contribute to the Nuxeo project! We have open positions in France and the UK for open source Java EE developers and sales engineers, both junior and senior. Trackback PingsTrackback URL for this entry:
http://blogs.nuxeo.com/sections/blogs/cedric_bosdonnat/2006_04_14_creating-simple-funambol-connector/tbping
Posted by Cedric Bosdonnat @ 04/14/2006 10:32 AM.
-
Categories:
apogee
-
0 comments
|
Nuxeo Bloggers: Log in!
Search
Search Nuxeo Blogs
Categories
Nuxeo Bloggers
Photos and Pictures
|
|
Nuxeo -
Indesko -
Nuxeo 5 Project
All content is copyrighted by their author. CPSSkins is Copyright © 2003-2006 by Jean-Marc Orliaguet. | CPS is Copyright © 2002-2006 by Nuxeo SAS. |