2

我在iOS和Android项目中使用Worklight。 我也使用适配器,进行安全测试,并使用基于适配器的认证Worklight推送通知和SecurityTest

我想使用推送通知,用户ID从基于适配器的认证功能接收。所以我使用相同的securityTest

现在,当我尝试使用我的安全测试与推送事件源,我有一个错误“无法从数据库部署适配器

WL.Server.createEventSource({ 
    name : 'MyPushEventSource', 
    onDeviceSubscribe : 'deviceSubscribeFunc', 
    onDeviceUnsubscribe : 'deviceUnsubscribeFunc', 
    securityTest : 'MySecurityTest', 
}); 

当我删除的最后一行(securityTest) ,适配器被部署,当我添加它时,它失败。

此securityTest已与多个其他适配器功能一起使用。

任何人都可以解释我有什么问题吗? 在此先感谢。

编辑:这是我的安全测试的定义:

<securityTests> 
     <customSecurityTest name="MySecurityTest"> 
     <test isInternalUserID="true" realm="MyAuthRealm"/> 
     </customSecurityTest> 
</securityTests> 
+0

你可以在这里添加安全测试(来自authenticationConfig.xml)吗? – 2013-03-14 12:26:14

+0

@ KerenBaron-Sela我刚刚编辑帖子以添加它 – WiPhone 2013-03-14 15:49:20

回答

2

最后,为我工作的解决方案是增加一个新的安全测试,以相同的境界,并与类型mobileSecurityTest

<mobileSecurityTest name="MyPushSecurityTest"> 
     <testUser realm="MyAuthRealm"/> 
     <testDeviceId provisioningType="none"/> 
    </mobileSecurityTest> 

我认为这应该被添加到当前的Worklight文档中,或者必须打开一个错误报告。

谢谢大家的帮助。

+0

现在,当我添加 \t调查我再gestting相同的错误:{ \t \t间隔:3, \t \t onPoll:gotNotificationFromBackEnd, \t}, – WiPhone 2013-03-16 09:29:33

0

好像没有“MySecurityTest”在“服务器/ conf目录/ authenticationConfig.xml”,确保定义了用户添加有与测试这名:

<securityTests> 
    <customSecurityTest name="MySecurityTest"> 
     <test realm="..." isInternalUserID="..."/> 
    </customSecurityTest> 
</securityTests> 
+0

安全性测试在authenticationConfig.xml中定义良好,并且对适配器功能没有任何问题。 仅当我将它添加到推送事件源时才会出现错误! – WiPhone 2013-03-14 15:45:57

+0

您是否尝试删除适配器并将其新鲜部署? – 2013-03-14 18:53:34

+0

相同结果: FWLSE0082W:无法从数据库部署适配器(存档:'/var/folders/8p/qylwgy6j2wq4bktw4r5hxqvr0000gp/T/myAdapter5096175866595804426.adapter')。 – WiPhone 2013-03-14 20:09:57