Menu
  • HOME
  • TAGS

Hydbrid App In IBM Worklight [closed]

worklight,worklight-adapters

changed code as follows var userpwdUpdateStatement = WL.Server.createSQLStatement("UPDATE USERS SET USERPASSWORD=? WHERE USERNAME = ? AND USERPASSWORD=? "); function updateUserPassword(newPassword,userName,password) { var encryptdecryptutility = new com.abcd.bgf.SysCRAESencrpDecrp(); var encryptnewPassword = encryptdecryptutility.encrypt(newPassword); var encryptoldPassword = encryptdecryptutility.encrypt(password); return WL.Server.invokeSQLStatement({ preparedStatement : userpwdUpdateStatement, parameters :...

Adapter deployment failed: HTTP 415 - Unsupported Media Type

worklight,worklight-adapters

From the comments: You could do something a bit "extreme" and: Close eclipse Navigate to the Eclipse workspace and delete the worklightServerConfig folder, then Restart Eclipse. I suspect something got confused in the server somehow. Maybe this "hard reset" (recreate, really) will help. Your project remains in tact. ...

How to remove the HttpOnly attribute from a cookie

worklight,worklight-adapters,mobilefirst

Indeed the HttpOnly additional flag is added by Worklight. The HttpOnly flag helps in mitigating the risk of client-side script accessing the protected cookie. Worklight does not offer the ability to remove this additional flag. That said, while you cannot access it via JavaScript, you could access it in native...

Worklight Adapter override adapter xml

worklight,worklight-adapters

In all Worklight releases up to and including the recently released IBM MobileFirst Platform Foundation 6.3 (formerly Worklight), once a JavaScript or Java adapter has been deployed it becomes an object that is stored in memory. It is therefore not possible to alter the backend URL properties that were defined...

WL.Logger.Send() its Not callback the WLClientLogReceiver adapter

worklight,worklight-adapters

logger : {enabled: true, level: 'debug', stringify: true, pretty: false, tag: {level: false, pkg: true}, whitelist: [], blacklist: [], nativeOptions: {capture: true}} You have enabled the native capture as true in initOptions.js so no need to set it again. You can log using your package that will help you in...

MobileFirst push notification- poll not works

worklight,worklight-adapters,mobilefirst

If by "not working" you mean that you do not see the log line in the server log, then make sure that in Eclipse, in the Servers view > Server Configuration > Logging section, the "Console log info" option is set to INFO.

Worklight: error Push Notification on Android

push-notification,worklight,worklight-adapters

I have tested your application. I managed to receive the push notification in all 3 scenarios: when the app is in the foreground, when the app is in the background and when the app is close. I have 2 comments: var response = {Data:[{username:'hcv',password:"123456",bagde:"3",message:"hi,Jane"},{username:"vi",password:"123",bagde:"1",message:"hi,Julian"}]}; Here, the badge should not be...

Http Adapter Invocation failure?

worklight,worklight-adapters

I got the solution for this problem. The problem is in my Html page i.e instead of using this. <input type="submit" value="GetDetails" onclick="GetDetails()"> use the following tag with button type then its working. <input type="button" value="GetDetails" onclick="return GetDetails()"> And for displaying the data I added some code in .js file...

Client Certificate Authentication and User Enrollment

openssl,worklight,worklight-adapters,worklight-server,worklight-security

The user authentication feature is it's own separate security realm. It allows you to specify a dependent user auth realm that is used when an x509 certificate is not provided by the client. The dependent realm is basically used to enroll the device/user/app into your PKI. The dependent realm can...

How to cache data in IBM Worklight?

jquery,caching,worklight,worklight-adapters

One of the features in Worklight is called JSONStore. This feature allows you to store data locally in the device to be retrieved at any time (as well as be synced with the server and be encrypted, but those are less related here). This way you could store related data...

IBM Worklight SQL adapter for real device

android,worklight,worklight-adapters,worklight-server

Your problem is not with the SQL server it is with the connection between the device and the Worklight server. You need to be able to connect from the device to the Worklight server. Open a browser on the device and point it to the Worklight console and see that...

how to upload the image in worklight

worklight,worklight-adapters

I don't know about that SQL query, it doesn't tell much. What you need to do is base64 encode the image and save this string to your database. Similarly when you want to pull the image and display it, you will need to decode the string back to an image....

Behavior of WL.server.createEventSource on a Worklight Cluster Environment

worklight,worklight-adapters,websphere-liberty,worklight-runtime

Here's my attempt to answer this after some consultation: My question is, what will happen on a cluster environment. Will repeated work ensue? By other words, would my two WL Servers will be pooling for events? While the Worklight Servers share the same runtime, they are still considered as 2...

JSON - how to convert plain format into json format?

javascript,json,worklight,worklight-adapters

What did you set for returnedContentType? JSON or plain? Edit: since you are returning plain... Try something akin to the following: var obj = JSON.parse(response.text)...

SQL Adapter Failure Error in IBM Worklight

worklight,worklight-adapters

The problem was fixed by removing the semicolon (;) at the end of insert and update statements. For some reason DB2 was not accepting semicolon terminating these program statements

worklight get image blob from mysql

javascript,mysql,worklight,worklight-adapters

Adapters returns only a JSON object. A BLOB is a binary large object. You need to convert the binary object to base64 before it is sent as the response.

worklight adapters, session variables: do multiple requests race?

worklight,worklight-adapters

Here's what one of the Worklight architects says: Worklight runs the requests in separate threads, where the global variables are accessible to all those threads as a shared Scriptable object. So technically, two concurrent requests from the same session updating multiple fields of the shared object may leave that object...

Unauthorized WL.Client.invokeProcedure call

worklight,worklight-adapters

I think the test is a bit misleading since "you" as an attacker will have several prerequisites: have the technical skill of manipulate code, invoking code and know what is a "normal" user. That said: In the upcoming MobileFirst Platform v7.0 you will be able to obfuscate the code of...

IBM Worklight - Unable to connect to database when using IP address instead of localhost

mysql,worklight,worklight-adapters

I don't know which database front-end you're using, but you need to go to the user creation/permission screen and make sure you have given the user "root" permission to connect to both localhost and % (all), so that the IP address would be accepted as well. For example: [email protected]% rather...

Invoking a worklight adaptor from a stand alone java program

java,worklight,worklight-adapters

First, you should probably remove the /dev from the URL; /dev should be used only in a development environment. Second, I suggest looking at the solution provided to this question: Java URL doesn't seem to connect, but no exception thrown From the comments: Missing line of code: BufferedReader in =...

Read adapter procedure requestTimeoutInSeconds from worklight.properties file

worklight,mobilefirst,worklight-adapters,mobilefirst-adapters

That is indeed one of the parameters that you cannot 'externalize' to worklight.properties in order to read its value from a variable. You can submit a feature request here: http://developer.ibm.com/mobilefirstplatform/help...

Deploying in Worklight get alert: The file name, directory name, or volume label syntax is incorrect

worklight,worklight-adapters,worklight-studio,worklight-server,worklight-runtime

The problem was really silly actually, yesterday I had opened an html file in notepad to edit it and set the default program to open html files as notepad. Since I didn't change it back, Eclipse tried to open the simulator path in notepad, I just had to change the...

Convert json to xml in worklight adapter

worklight,worklight-adapters

Finally i got the answer after googling a lot. Worklight has flexibility to use java code. I had already java code ready which serves the purpose(convert json to xml) so i just imported that class in my worklight project(copy in apps/server/ folder). In adapter i have used that class like...

Worklight 6.2 - Broadcast notification not being sent

push-notification,worklight,worklight-adapters

Looking at your application from the PMR, it seems to me like you have mixed both event source-based notifications and broadcast notifications. If you want to use Broadcast notifications, this means you cannot try imposing sending the notification to any specific userId, etc as it is not needed nor based...

Connect to Multiple Database

worklight,worklight-adapters

In current releases of Worklight (5.x - 6.3), you cannot achieve this when using 1 adapter. In order to connect to different databases your only option is to create several adapters. Then, for each selected option from the dropdown, a different WL.Client.invokeProcedure code will be used to send a request...

Worklight Java-based HTTP adapter deployment

java,worklight,worklight-adapters

This type of issue typically happens when there is a mismatch between the used Java versions. If you have Java 6 or 7, make sure that your Eclipse preferences also use the same Java level (Eclipse > Preferences > Compiler > Compiler compliance level) And that Eclipse is indeed using...

IBM Worklight - Adapter Javascript fails

javascript,worklight,worklight-adapters

items should be resultSet. Tested locally and verified to work after the below changes. Change this: if (!result || !result.invocationResult || !result.invocationResult.items || result.invocationResult.items.length == 0) To This: if (!result || !result.invocationResult || !result.invocationResult.resultSet || result.invocationResult.resultSet.length == 0) And this: feeds = result.invocationResult.items; To this: feeds = result.invocationResult.resultSet; ...

SQL adapter in Worlight?

mysql,worklight,worklight-adapters

A hacker decompiling your .apk or .ipa file will not find the database username/password there, for the simple reason that the adapter is not compiled "together with the app" and is not part of any artifacts that you install in a device. An adapter is a server-side entity, not client-side....

Worklight Adapter Authentication in one session shared across another

worklight,worklight-adapters,worklight-security

Chrome is sharing the session between the different tabs, it has nothing to do with Worklight. What you can do is open a new browser in incognito mode to prevent sharing the session. Or open a different kind of browser....

Where does the adapter files go after deploying them to worklight server?

worklight,worklight-adapters,worklight-server

See this answer: Worklight Adapter override adapter xml To simplify: the adapter file gets deployed to the management server's database. From there server nodes get via the management service. The 'adapter' itself is then being run from the server's memory. It is transformed into an object in the server's memory....

Worklight SQL Query

mysql,sql,worklight,worklight-adapters

There is no way to take the table name as a parameter in a static sql query. The only way to do this is to create the sql query dynamically. Take a look here: Sql - tablename as variable

Defining global variables in MobileFirst Platform Adapters

worklight,worklight-adapters,worklight-server

Variables defined in an adapter are not available in/shareable with other adapters. If you'd like to share this variable, what you can do is send the data to another adapter via an action called "adapter mashup". This is explained in the following tutorial: Advanced adapter usage and mashup. This is...

Accessing json document keys in adapter procedure (IBM worklight)

worklight,worklight-adapters,jsonstore

Try using JSON.parse to turn the string into a JavaScript object. function addGegegr(document) { var doc = JSON.parse(document); //... use doc as a regular JavaScript object } If JSON.parse is not available there, you can add it by including this code in the adapter implementation file....

Post Form Value to SQL adaper Worklight V6

javascript,sql,worklight,worklight-adapters

The following answer provides an end-to-end scenario for inserting values taken from the HTML and into a database: http://stackoverflow.com/a/25164028/1530814 You need to get the input from the HTML and use it as the WL.client.invokeProcedure's parameters: function loadFeeds1(){ var invocationData = { adapter:"car2", procedure:"getuser", parameters:[$('#carnum').val(),$('#details').val()] }; WL.Server.invokeProcedure(invocationData,{ onSuccess :loadFeedsSuccess1, onFailure :loadFeedsFailure1,...

IN query not returning any result, worklight SQL Adapter

oracle,worklight,worklight-adapters

You're passing a single scalar bind value with ?, and a single string of comma-separated values. Your query is looking for a row where the MAC is "xx:xx:xx:xx:xx","yy:yy:yy:yy:yy", and not any row matching either of the individual addressed. IN will not break your string into tokens automatically. There are various...

When Worklight Adapter release java Objects?

java,worklight,worklight-adapters

JavaDoc says about finalize(): Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. So, your finalize method invokes when GC will start....

How to invoke Java adapter procedure from JS adapter procedure in MobileFirst Platform 7.0?

worklight,mobilefirst,worklight-adapters,mobilefirst-adapters

In general the new RESTful JAX-RS (Java-based) adapters in version 7.0 operate independently of the old JavaScript-style adapters. I'm not aware of an in-process API to call them, so you would have to call them like any other RESTful service using WL.Server.invokeHttp (i.e. like how you might typically do this...

Invoking Worklight Adapter and Displaying that JSON data in list view as strings

java,javascript,worklight,worklight-adapters,worklight-server

You need to correct the below and then re-deploy the application. You have misspelled a function name: LoadSQLRecords should be loadSQLRecords. function wlCommonInit(){ LoadSQLRecords(); // Upper-case 'L'; should be lower-case. } function loadSQLRecords(){ var invocationData = { adapter : 'MySQLadap', procedure : 'procedure1', parameters : [] }; }; You should...