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