Sync4j的Nokia手机实践结果

 

配置好Sync4j服务器后,我在Nokia手机上设置好同步,准备和这个远端服务器进行联系人的同步。<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

下面的日志记录了两次失败的过程:

第一次手机登录:

由于Sync4j对设备要求事先在管理控制台上配置好,并添加规则,才能够让手机登录。所以第一次尝试遭遇到了下面的失败提示:

[Sep 17, 2005 2:13:16 PM] INFO: Handling incoming request /sync4j/sync.

[Sep 17, 2005 2:13:16 PM][sync4j.handler] WARNING: Client device 'IMEI:354488006208691' not found. Authentication may fail.

[Sep 17, 2005 2:13:17 PM][sync4j]

SEVERE: Error reading principal: sync4j.framework.server.store.NotFoundException: Principal not found for IMEI:354488006208691/guest

[Sep 17, 2005 2:13:17 PM] INFO: Authentication failed for device IMEI:354488006208691. Make sure that the client used correct username and password and that there is a principal associating the user  to the device.

 

这时候手机上提示“无效的用户名密码”。

说明手机的设备IMEI在系统中没有定义。

 

添加了Device,添加了该IMEI Device+UserPrincipal之后,重新来过。

第二次手机登录:

[Sep 17, 2005 2:19:05 PM] INFO: Handling incoming request /sync4j/sync.

[Sep 17, 2005 2:19:13 PM] INFO: guest/IMEI:354488006208691 logged in.

 

这时候手机上提示“无法打开数据库”。

打开所有的日志,可以看到:

[Sep 17, 2005 3:06:09 PM]

[sync4j.engine]

FINEST:

 Checking if the database

sync4j.framework.database.Database@1d349e2[name=./scal,type=<null>,statusCode=200,target=sync4j.framework.core.Target@97d3f0,source=sync4j.framework.core.Source@1db6942,anchor=sync4j.framework.core.Anchor@1db9f45,principal=IMEI:353388006208690/guest] is in the server database list.

[Sep 17, 2005 3:06:09 PM][sync4j.engine] FINEST: Not found sir

而使用Sync4j所带的gui client得到的成功登录日志是:

[Sep 17, 2005 3:13:08 PM] INFO: guest/syncml-phone logged in.

[Sep 17, 2005 3:13:08 PM][sync4j.handler] FINEST: moving to state STATE_PKG1_RECEIVING

[Sep 17, 2005 3:13:08 PM][sync4j.handler] FINEST: Processing the initialization commands

[Sep 17, 2005 3:13:08 PM][sync4j.engine] FINEST: Checking if the database

sync4j.framework.database.Database@1a32ea4[name=scal,type=<null>,statusCode=200,target=sync4j.framework.core.Target@4b12d9,source=sync4j.framework.core.Source@c28cb7,anchor=sync4j.framework.core.Anchor@a45435,principal=syncml-phone/guest] is in the server database list.

[Sep 17, 2005 3:13:08 PM][sync4j.engine] FINEST: Yes sir!

也就是说,Nokia手机登录sync4j总是设置数据库为“./scal”,而原本应该为“scal”。

在手机端配置参数时,确实有一个数据库名要求配置,但明明写的是“scal”,不知道为什么传过来请求时多了一个“./”,造成接下来“Not found sir”错误,所以手机上提示“无法打开数据库”。

 

看了别家的应用,估计应该是这样:
在"远程数据库"输入"./contact",而不是像我开始输入的“scard”,这样就可以了。

郑昀@ultrapower 2005-9-19

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值