Worklight事件源,什么安全测试 [英] Worklight Event Source, what security test
问题描述
Worklight 6.1,在Mac上的WL Studio中进行测试。
Worklight 6.1, testing in WL Studio on a Mac.
作为这个问题关于在Worklight Server中进行后台工作,接受的答案是使用事件源。
As a follow-up to this question concerning doing background work in a Worklight Server, the accepted answer to which is to use an Event Source.
WL.Server.createEventSource(
{
name: "housekeepingEventSource",
poll: {
interval: 5,
onPoll: workToBeDone
},
securityTest: "eventTest"
}
);
该问题涉及要使用的安全测试。无论我尝试什么,我都会收到此错误:
The issue concerns which security test to use. Whatever I try I get this error:
适配器部署失败:包装java.lang.ClassCastException:
org.mozilla.javascript .gen._(... elisions ...)
_chmSecurityService_impl_js_83无法强制转换为java.lang.String(/integration.js#258)
Adapter deployment failed: Wrapped java.lang.ClassCastException: org.mozilla.javascript.gen._ (... elisions ...) _chmSecurityService_impl_js_83 cannot be cast to java.lang.String (/integration.js#258)
参考这个问题
我用过这个安全测试:
<mobileSecurityTest name="eventTest">
<testUser realm="wl_anonymousUserRealm"/>
<testDeviceId provisioningType="none"/>
</mobileSecurityTest>
请提示......
推荐答案
这是民意调查定义中的拼写错误。顺序是,当错误地指定安全性测试时,适配器未与其他错误消息一起部署。一旦我进行了有效的安全测试,那么民意调查就被激活了,因为它有缺陷我们得到了上述错误。
This was a typo in the poll definition. Sequence was that when security test was incorrectly specified the adapter didn't deploy with other error messages. Once I had a valid security test then the poll was activated, and as it wa`s defective we got the above error.
poll: {
interval: 5,
onPoll: workToBeDone
},
是错的,因为我应该使用字符串文字
is wrong, as I should have used a String literal
poll: {
interval: 5,
onPoll: 'workToBeDone'
},
如果有人读取错误消息小心的正是它告诉我的......
which if one reads the error message carefully is exactly what it's telling me ...
这篇关于Worklight事件源,什么安全测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!