ibm-mobilefirst

How to delete a file using Cordova?

末鹿安然 提交于 2019-12-24 13:34:20
问题 Note: this question is being re-posted because for whatever reason the original poster decided to remove it after an answer was provided and accepted. I am therefore adding it again to preserve the knowledge Original question: I'm trying to understand how the crud operations for cordova appache works. I created a delete function in worklight as follows: index.html: <a href="#" class="btn large" onclick="deleteAudio();">Delete the local MP3 file</a><br/> main.js: function deleteAudio() { var

Worklight Adapter Override Origin of request

不打扰是莪最后的温柔 提交于 2019-12-24 13:32:08
问题 Worklight 6.1 Using Chrome to test backend access API's and in one scenario the ability to override the Origin is needed to successfully issue the request and avoid a status 403. Implementing the same API in a Worklight http adapter I would like to override the Origin to avoid hitting a 403. It is possible to override the Origin in a worklight http adapter. Thanks for your time and help 回答1: Did not try this myself as I don't have an application doing what that yours is doing, but you can add

How to use the PATCH method in HTTP adapters?

大憨熊 提交于 2019-12-24 13:31:10
问题 Can any please help me about how to make HTTP call using the PATCH method in an HTTP Adapter in IBM Worklight? 回答1: The PATCH method is not supported. Per the HTTP adapter documentation: You can use the HTTP adapter to send GET , POST , PUT , and DELETE HTTP requests and retrieve data from the response body. Data in the response can arrive in XML , HTML , or JSON formats. You can submit feature requests via: http://www.ibm.com/developerworks/rfe/ 来源: https://stackoverflow.com/questions

IBM Worklight 6.1 - Tile badge from push notification never cleared on Windows Phone 8

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 12:53:55
问题 I'm using Worklight 6.1 and sending push notifications to Windows Phone 8. It is working swell, except for the tile badge. It is not being cleared when I use the tile to launch the app. The notification that I'm sending is: {"APNS":{ … },"GCM":{ … },"SMS":{ … },"MPNS":{"raw":{"payload":{}},"toast":{"text1":"Luggage Tracker","text2":"You have 3 available messages"},"tile":{"count":3}}} The toast message pops up, and the tile gets the badge, but the badge doesn't clear when I launch the app,

Class Cast: java.lang.String cannot be cast to org.mozilla.javascript.Scriptable

ぃ、小莉子 提交于 2019-12-24 12:43:35
问题 While invoking a http adapter procedure, it popsup a dialog with ProcedureName, Signature and Paramaters and when I hit Run button after entering two string type parameters, I am getting "Class Cast: java.lang.String cannot be cast to org.mozilla.javascript.Scriptable" error. FYI, I created a worklight adapter using worklight application framework data object editor(automatically generates .xml and impl.js files) impl.js file function CurrencyConvertor_ConversionRate(params, headers){ var

Worklight WL.Server.invokeHttp() with DELETE method doesn't accept query param

断了今生、忘了曾经 提交于 2019-12-24 12:35:07
问题 I have a Worklight adapter that calls a RESTful method through WL.Server.invokeHttp() . When an http DELETE method is used, the query string parameters do not get added. I'm on Worklight 6.0. The input is setup like so: { "headers": { "Accept": "application\/json", "Authorization": "Bearer xxxxxxxxxxxxxxxx", "Content-Type": "application\/json" }, "method": "delete", "parameters": { "messageIds": "r11118,r11119" }, "path": "\/myMessages\/v2\/messages" } and called like: var result=WL.Server

Run Ant files when performing Build and Deploy Worklight 5.x.x Application

橙三吉。 提交于 2019-12-24 12:11:43
问题 I have a Worklight application set up in Eclipse. Before executing Build And Deploy Worklight Application , I need to run a bat that compiles a bunch of HTML templates. This templates are necessary to run the app correctly. So, I would like to know if it is possible to link (maybe under Run Configurations... ?) an Ant file or similar that allows me to execute the bat and perform the build & deploy in an automatic way. Any advice? Hope the question is clear. 回答1: I believe you can add an extra

Getting response from HTTP Adapter from Worklight

青春壹個敷衍的年華 提交于 2019-12-24 10:58:04
问题 I am new to worklight. I tried to get the json response from the http adapter, but I am unable to get it to display on device. I added some alerts in my javascript code and found that it is returning the size of json object as `undefined``. Here is my adapter javascript file: function getGooglePlaces(location,name) { var input = { method : 'get', returnedContentType : 'json', path : 'maps/api/place/search/json', headers: { Host: 'maps.googleapis.com' }, parameters : { 'key' : MyKey, 'location

IBM Worklight - How to enable App Authenticity in Worklight Console?

浪尽此生 提交于 2019-12-24 10:57:16
问题 I tried to follow the tutorial at this url, the tutorial is so straight forward but I just couldn't get the correct outcome. below is my authenticationConfig.xml <securityTests> <customSecurityTest name="custom-mobilesecurityTest"> <test realm="wl_antiXSRFRealm" step="1"/> <test realm="wl_authenticityRealm" step="2"/> <test realm="HeaderAuthRealm" isInternalUserID="true" step="3"/> </customSecurityTest> </securityTests> But the App Authentication appeared in console is always "Access Disabled

Worklight Adapter Basic Authentication Caching?

孤街醉人 提交于 2019-12-24 10:56:28
问题 I'm having an issue with basic authentication using a Worklight adapter. Whenever I authenticate to a REST URL, it authenticates fine. However, the authentication seems to create a session within the Worklight server. Example Call function getTaskList(username,password) { var input = { method : 'post', returnedContentType : 'json', path : 'rest/url', headers: { 'Authorization': 'Basic '+base64Encode(username+':'+password), } }; return WL.Server.invokeHttp(input); } Whenver I attempt to login