IBM MobileFirst 7.0,脱机示例应用程序无法正常工作

时间:2015-03-26 11:43:49

标签: ibm-mobilefirst mobilefirst-server mobilefirst-studio

环境:
1. Windows 7和
2. IBM MobileFirst Platform Studio 7.0

使用以下过程导入并测试使用入门模块的IBM strongFirst Platform 7.0示例脱机工作应用程序。

1. Set heartbeat to 5 seconds
2. Background application behavior can be seen using web debuggers
3. Shut down MobileFirst Server
4. In a few seconds heartbeat should fail, and disconnectDetected function should be invoked
5. Start up MobileFirst Server
6. In a few seconds heartbeat should succeed, and connectDetected function should be invoked

但是,当服务器分别停止和启动时,未触发 disconnectDetected connectDetected 功能。

function disconnectDetected(){
    var output = new Date() + "<hr />disconnectDetected";
    $('#info').html(output);
}

function connectDetected(){
    var output = new Date() + "<hr />connectDetected";
    $('#info').html(output);
}

记录如下。

http://localhost:10080/WorkingOffline/apps/services/preview/WorkingOffline/common/0/default/js/test.js Failed to load resource: the server responded with a status of 404 (Not Found)
wljq.js:8654 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
worklight.js:5127 wlclient init started
worklight.js:5127 before: initOptions.onSuccess
worklight.js:5127 after: initOptions.onSuccess
worklight.js:5127 wlclient init success
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 401 (Unauthorized)
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3794 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.handleResendOrSendPostAnswersworklight.js:3783 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.removeExpectedAnswerworklight.js:9432 challengeHandler.submitChallengeAnswerworklight.js:10193 wl_antiXSRFChallengeHandler.handleChallengeworklight.js:9328 AbstractChallengeHandler.startChallengeHandlingworklight.js:9251 executeChallengeworklight.js:9153 checkResponseForChallengesworklight.js:3598 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailureworklight.js:956 (anonymous function)worklight.js:1178 window.WLJSX.Ajax.Request.WLJSX.Class.create.respondToReadyStateworklight.js:1111 window.WLJSX.Ajax.Request.WLJSX.Class.create.onStateChangeworklight.js:956 (anonymous function)
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat net::ERR_CONNECTION_REFUSED
worklight.js:5127 Application is now offline.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] Host is not responsive.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 404 (Not Found)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 404, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 503 (Service Unavailable)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 503, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 503 (Service Unavailable)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 503, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 503 (Service Unavailable)
worklight.js:5127 Application is now  online.
worklight.js:5127 [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] failure. state: 503, response: The server was unable to process the request from the application. Please try again later.
worklight.js:5127 Failed to send heartbeat
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:1097 POST http://localhost:10080/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat 401 (Unauthorized)
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3794 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.handleResendOrSendPostAnswersworklight.js:3783 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.removeExpectedAnswerworklight.js:9432 challengeHandler.submitChallengeAnswerworklight.js:10193 wl_antiXSRFChallengeHandler.handleChallengeworklight.js:9328 AbstractChallengeHandler.startChallengeHandlingworklight.js:9251 executeChallengeworklight.js:9153 checkResponseForChallengesworklight.js:3598 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.onWlFailureworklight.js:956 (anonymous function)worklight.js:1178 window.WLJSX.Ajax.Request.WLJSX.Class.create.respondToReadyStateworklight.js:1111 window.WLJSX.Ajax.Request.WLJSX.Class.create.onStateChangeworklight.js:956 (anonymous function)
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully
worklight.js:5127 Request [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat]
worklight.js:5127 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":""}}worklight.js:5127 WL.Logger.__logworklight.js:5511 PUBLIC_API.(anonymous function)worklight.js:3330 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeadersworklight.js:3388 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequestworklight.js:3302 window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initializeworklight.js:524 klassworklight.js:7249 sendHeartBeatworklight.js:893 onTimerEventworklight.js:956 (anonymous function)
worklight.js:5127 Application is now  online.
worklight.js:5127 response [/WorkingOffline/apps/services/api/WorkingOffline/common/heartbeat] success: 
worklight.js:5127 Heartbeat sent successfully

但是,从IBM MobileFirst Platform 6.3 Sample Working Offline应用程序开始,可以在IBM MobileFirst Studio 6.3中完美运行

1 个答案:

答案 0 :(得分:0)

实际上,这似乎是一个缺陷 - 它目前正在调试中 似乎没有解决方法。

如果需要修复,您需要打开PMR(IBM支持服务单)。