ibm-mobilefirst

How to send images through Worklight server without base64 encoding?

痞子三分冷 提交于 2019-11-28 02:03:10
问题 I`m trying to find out how to send images to my back-end server using Worklight adapters. I know that I can send them through Worklight adapters using Base64 encoding but this implies in around 30% more traffic between the servers and some undesired processing overhead. For now I`m using the Phonegap FileTransfer library as I show below, but this creates a directly connection between the client and the back-end server not going through Worklight server as I want. var options = new

How to increase the adapter procedure timeout value in Worklight?

独自空忆成欢 提交于 2019-11-28 01:41:42
How can I increase the timeout value of a Worklight adapter procedure? My app crashes and I see the following in the exception details: "response [/apps/services/api/index/common/query] success: / -secure- {"responseID":"24","errors":["Invocation of procedure 'getFTTitle' has timed out after 30 sec."],"isSuccessful":false,"warnings":[],"info":[]} / " There are several places in Worklight where a timeout value can be specified: CLIENT ----> WORKLIGHT SERVER -- (adapter) --> BACKEND You can increase the adapter procedure timeout (Worklight Server --> Backend) as follows: <procedure name=

IBM Worklight - How to launch another app?

限于喜欢 提交于 2019-11-28 01:36:38
I have a requirement to open the native version of the hybrid app (.ipa/.apk/.appx) when the hybrid app is requested in a device browser. I am able to detect the environment using WL.Client.getEnvironment(); method, if it is found to be Android/iPad, I want to launch the respective .apk/.ipa file in the device. Any help is appreciated. Idan Adar Re-reading this question and the comments several times... I still do not understand the actual scenario... it'd be best to rephrase it. Scenario: How to open an app from the web browser: If you have added the following environments to your Worklight

IBM Worklight 6.1 - Failed re-generating the iPhone native folder

人走茶凉 提交于 2019-11-28 01:36:18
I've recently upgraded from Worklight 6.0 to 6.1 and I'm trying to get an update from a 6.1 Worklight Server from an iPhone that has a version built from 6.0 on it. This does not seem to work, so I figured I must manually deploy a version on the iPhone that was built from 6.1 in order to get the update. So I deleted the native folder under iPhone so that when I build it would regenerate itself, but I got the following error on build: iphone build failed: com.worklight.builder.sourcemanager.handlers.ios.settings.IOSAddRemoveSettingsRefHandler - cannot update content of pbxproj file My Worklight

Not able to launch a pdf file in inappbrowser in android

拥有回忆 提交于 2019-11-27 23:05:58
I have a requirement to show a pdf in inappbrowser when user clicks on a link. It is working fine in ios but not working on android. I am using IBM worklight for my project. Below is the code I have used: window.open("pdfURL","_blank","location=yes"); In ios the inappbrowser launches and displays the pdf but in android the inappbrowser is launches but no content is displayed Idan Adar Unlike iOS, which has a built-in PDF viewer - Android's webview does not have PDF viewer built-in. This is why it is going to fail in Android. You have 2 choices in Android: View the file using Google Docs by

IBM Worklight - How to change dynamically domain/hostname to which the adapter connects from the client at launch or runtime?

ⅰ亾dé卋堺 提交于 2019-11-27 19:24:58
问题 When configuring WL HTTP Adapters, the domain and port are part of the adapter configuration .xml file build and uploaded on the WL server. For our use case (especially beta testing and demos) the endpoint server url needs to be configurable for the end user. Example, same builds are tested by QA on test envs, while BA connects to demo. We have only one WL Server up and setting environment specific servers is not an option. Is it possible to change domain/hostname dynamically at application

IBM Worklight - How to get OUT parameter when invoking a stored procedure?

被刻印的时光 ゝ 提交于 2019-11-27 16:22:41
I want to know is it possible to get OUT parameter when invoking a stored mysql procedure using worklight SQL adapter . For example i have an employee table:- and stored procedure for above table is:- and then i query like this:- It gives the following result :- Which is working fine. But when I invoke same procedure using Worklight SQL adapter instead on query browser like: - WL.Server.invokeSQLStoredProcedure({ procedure : "usp_GetEmployeeName", parameters : [103,"@name"] }); it only return me the result set and does not return OUT parameter value. Idan Adar Nope, the OUT parameter is not

What are the recommended ways to debug Worklight applications?

馋奶兔 提交于 2019-11-27 15:24:18
I'm finding it incredibly slow to fix issues that are specific to the iOS portion of my app. I'd like the know the recommended way to debug Worklight apps when the browser debugger isn't available. In particular, I'm working on issues with WL.JSONStore which only works on iOS and Android. I can't use the browser debugger to see what's going on. When I do WL.Logger.debug() statements, nothing is showing up in the Xcode console, and the iPad simulator console (Cordova) only displays a few lines. There have also been periods this week that no output is printed anywhere. I have downloaded and

Ecma Error: TypeError: Cannot call property

会有一股神秘感。 提交于 2019-11-27 09:32:41
I have written some java code in an adapter in worklight project. when i m trying to call the java method, i am getting an error saying "responseID":"6","errors": {Ecma Error: TypeError: Cannot call property downloadFile in object JavaPackage java.classes.FileIOPlugin]. It is not a function, it is \"object\".} I have followed the procedure exactly stated in the following link. Using Java in Adapters this is my project structure. Is there something wrong with this structure or should i add anything more to this? This is how i am trying to call the java non-static method in adapter-impl.js

Worklight - FWLST1040E: android build failed: java.io.FileNotFoundException

江枫思渺然 提交于 2019-11-27 09:04:34
问题 I'm using worklight 6.1 for my mobile app project. My problem is why I got this error when I try to build my android app. [2014-02-18 15:36:12] FWLST1040E: android build failed: java.io.FileNotFoundException: File '/var/folders/1k/k94ws4g107bgncjlp0_0vlwr0000gn/T/wlBuildResources/6.1.0.00.20131126-0630/environments/base/android/obscurerArgs.txt' does not exist Why? 回答1: Try deleting the wlBuildResources folder. See my answer here: IBM Worklight 6.1 - Failed re-generating the iPhone native