ibm-mobilefirst

What is the way to parse XML in a Worklight Adapter?

若如初见. 提交于 2020-01-17 08:29:35
问题 In a notification Worklight adapter - I invoke the adapter passing a very long XML string from the backend service. The backend service cannot be altered or changed. I want to be able to turn the javascript String object into something I can parse and use useful functions on such as : var custNum = doc.getElementsByTagName("data:custNum")[0]; However all attempts so far at creating the 'doc' variable have failed. Standard DOMParser and window methods are undefined and out of scope in adapters

How to access IBM MobileFirst 7.1 default attribute store in session independent mode

不打扰是莪最后的温柔 提交于 2020-01-17 06:52:43
问题 I am working on migrating a IBM MobileFirst 6.3 project to version 7.1 and enabling the 7.1 session independent mode. I have specified the attribute store as the worklight default runtime database. In the previous version I have used HTTPSession object in HTTP JavaScript adapters to dynamically store some minimal data related to the current user session as shown in the sample code below. var request = WL.Server.getClientRequest(); var session = request.getSession(); session.setAttribute("ID",

Mobilefirst 7.0 protecting a Java Adapter fails with Custom Authenticator

点点圈 提交于 2020-01-17 05:16:07
问题 Im following and using the sample code from Custom Authenticator and Login Module and UserAdapter from Java SQL Adapter. I want to get the user list after authenticated. My configuring the authenticationConfig.xml file <realms> <realm loginModule="CustomLoginModule" name="CustomAuthenticatorRealm"> <className>com.mypackage.MyCustomAuthenticator</className> </realm> </realms> <loginModules> <loginModule name="CustomLoginModule"> <className>com.mypackage.MyCustomLoginModule</className> <

MobileFirst 8.0 Direct Update failing after downloading the updates

家住魔仙堡 提交于 2020-01-17 04:40:06
问题 I am using MFP8 and my application is a Cordova based hybrid app running on Android platform (no native code only HTML, JS and CSS) In MFP8, according to documentation WL.connect() is not there anymore and calling an unprotected resource will not trigger Direct Update. So I created a secured method in my HTTP adapter and I call it. I also wrote a challenge handler (which basically does nothing just returns true,) and the adapter call is successful and rest of my application works fine. Note:

IBM Worklight - “Client init failed. Connection to the service is not available.”

纵然是瞬间 提交于 2020-01-17 02:55:14
问题 I've created an Android app in Worklight Developer Edition. When I change the connectOnStartup property to true in the initOptions.js file and then install the application on the device, on startup, in LogCat I see: Client init failed. Connection to the service is not available. And in the app there's a dialog with: The application failed connecting to the service. Can anyone help me? 回答1: Make sure your device and host are using the same WiFi network... To verify your device is able to

IBM Worklight 6.0 - Native Android app unable to connect when using HTTPS

℡╲_俬逩灬. 提交于 2020-01-17 01:12:29
问题 I have a simple Android Hybrid and Native Application developed using Worklight 6.0. Over http both the apps work fine with connecting to the server and invoking a procedure. But as soon as I move to https, hybrid app works fine, but I can see that the native connect request itself is not received at the server end. Do I need to enable anything else to get https working on the android native app? 回答1: To use HTTPS, you need to configure your SSL certificate on your WAS server. The SSL

Saving image to SD Card in a Worklight application

隐身守侯 提交于 2020-01-16 19:02:07
问题 I have created a Worklight application and added to it the Android environment. This application has a button to take a photo using the device camera, and an img tag in the HTML which displays the captured photo. I followed this PhoneGap Camera API. Now I am trying to store that image into the SD Card but fail doing so. my EDIT: I changed my code as below: function takeimage() { // Retrieve image file location from specified source navigator.camera.getPicture(getImageURI, function(message) {

Send request with parameter IBM Worklight

依然范特西╮ 提交于 2020-01-16 18:06:35
问题 I've already use http adapter and successfully send a request but I can't do it with parameter I want to send the parameter cmd=login how to put it in parameter = [] ? var invocationData = { adapter : 'RSSReader', procedure : 'login', parameters :[] }; ----------------------update------------------------------- I try the official parameter format var invocationData = { adapter : 'HTTPAdapter', procedure : 'login', parameters :[{name : 'cmd', value : 'login'}] }; but still send nothing? <?xml

Issue connecting to MobileFirst Server via HTTPS

前提是你 提交于 2020-01-16 03:51:14
问题 We have an app that connects to a MobileFirst Server. Our app connects fine via HTTP, however it will not connect via HTTPS. The App itself is a native iOS app built with Xcode. We have a self signed certificate on the server. The server is setup to pass the whole certificate keychain back to the client (Root, Intermediate and finally the server certificate) in that order. All these certificates have been installed on the client iOS device as well, according to these specifications Connecting

IBM Worklight - Limitations of Worklight Studio for Developers

≡放荡痞女 提交于 2020-01-16 00:53:15
问题 is there any documented limitations of Worklight Studio for developer? Or any differences between Worklight Studio for developer and the Worklight Studio provided after the product purchase? 回答1: @Alastair Pitts: IBM Worklight Studio is a plug-in for the Eclipse IDE, that allows you to develop applications for the IBM Worklight Mobile Application Platform. The differences between the IBM Worklight Developer/Consumer/Enterprise editions are: Developer: Developer edition is licensed for