2016-08-01 64 views
-1

enter image description here我正在使用WL.Client.connect(選項)從我的混合應用程序連接到worklight服務器,並回應此錯誤(請參閱附件)。 我檢查了WL控制檯,我的應用程序和適配器沒有任何問題地部署。 在日誌中找不到任何錯誤消息。未連接到Worklight服務器的應用程序

function performWlConnect() { 

    return new Promise(function (resolve, reject) { 

     // Worklight server connection callback configuration 
     var wlConnectOptions = { 
      onSuccess: resolve, 
      onFailure: reject 
     }; 

     logger.info('Connecting to the worklight server side...'); 
     // Perform connection to the server side 
     WL.Client.connect(wlConnectOptions); 
    }); 
} 
+0

什麼是錯誤? –

+0

對不起,忘了添加圖像,只是添加了。 –

+0

仍然沒有足夠的信息。提供你的代碼,並提及你在哪裏測試這個。 –

回答

0

嘗試用簡單連接和打印你得到的錯誤,它可以幫助你更好地診斷您的流量。

function wlCommonInit() { 
    WL.Client.connect({onSuccess:onConnectSuccess, onFailure:onConnectFailure}); 
} 

function onConnectSuccess() { 
    ... 
} 

function onConnectFailure(response) { 
    WL.Logger.debug(response); 
} 
相關問題