worklight-adapters

How to retrieve images from existing database using sql/http adapter from worklight application

房东的猫 提交于 2019-11-29 16:50:31
I'm having an existing database and i have to show the list of images in my worklight application to user so that they can select and adds to cart. The image column in database is having only path of images at server. i.e "memory/toppings/nuts/hazelnuts.jpg" "memory/toppings/nuts/macadamia_nuts.jpg" so how to get all these images and show on my worklight application. What you should do is concatenate the server URL and the image path after you retrieve it from the database. Lets say in the database I store this: "/uploads/original/6/63935/1570735-master_chief.jpg", so the concatenation would

Worklight Adapter getting pdf file from rest service

核能气质少年 提交于 2019-11-29 15:58:52
I am trying to access to a Rest Service who exposes a pdf file, but I get this response when invoking the procedure: { "errors": [ "Failed to parse the payload from backend (procedure: HttpRequest)" ], "info": [ ], "isSuccessful": false, "responseHeaders": { "Content-Type": "application\/octet-stream; type=\"application\/xop+xml\"; boundary=\"uuid:****************\"; start=\"<pdf>\"; start-info=\"application\/pdf\"", "Date": "Thu, 07 Nov 2013 14:44:54 GMT", "Server": "Apache-Coyote\/1.1", "Transfer-Encoding": "chunked", "X-Powered-By": "Servlet 2.5; **********", "content-disposition":

With a Worklight Adapter can I change the domain and port for a procedure at runtime?

梦想的初衷 提交于 2019-11-29 12:53:55
I am writing a worklight application and it will be connecting to a variety of backend services which will be decided by the consumer after installation. I would like to use adapters to connect the client to the backend services - but want to avoid editting and updating the adapter for each connecting user. Essentially each customer has a running server I want to connect to - however it will be running on a different port and domain for each customer. I want them to be able to pass those to the adapter to allow a common call to be issued to the customer's backend server. Is there a way that I

Calling Worklight adapter from external app

戏子无情 提交于 2019-11-29 12:09:31
I have deployed the adapter on Worklight server and there is some requirement where I am calling worklight adapter from outside as a rest serverice , it is working fine and returning data as required but instead of giving json output it is giving HTML <!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Invoke Procedure Result</title><script src="/secure/console/js/jquery-1.6.min.js"></script><style> textarea { width: 100%; } .textwrapper { margin: 5px 0; padding: 3px; }</style></head><body onload="attachEvent();"><div><span id="invRes">Invocation Result of procedure: 'Authentication'

How to send images through Worklight server without base64 encoding?

旧时模样 提交于 2019-11-29 08:40:49
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 FileUploadOptions(); options.fileKey="file"; options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);

Re-route/Divert some WL.Client Adapter Invocation traffic to WL Server through different URL (for PCI payment and security requirements)?

╄→гoц情女王★ 提交于 2019-11-28 14:44:07
Worklight 5.0.6.1 We are having a specific requirement from our client about using a PCI Appliance from Intel ( http://info.intel.com/rs/intel/images/Intel_Expressway_Tokenization_Broker.pdf ) to avoid a PCI Audit for the application and server. Therefore, the Adapter calls that have something to do with payment data would need to go through this hardware appliance before hitting the worklight server. All other adapter calls should go to the worklight server directly (to not overload the appliance). The idea is to have two different URLs but the same worklight server in the background. It is

Attaching cookie to WorkLight Adapter response header

爱⌒轻易说出口 提交于 2019-11-28 14:37:31
I am developing a mobile app using WorkLight 5.0.6 and I would like to attach a secure cookie to the response returned by an adapter. We are not using a WorkLight Authentication realm because we do not wish to "bind" the session to a specific WL server in a clustered production environment. We authenticate the session by calling a sign-on adapter which authenticates the user details against a back end system. As part of the response from the sign-on adapter call I would like to create a secure cookie (http only) containing the authenticated information and attach it to the response returned

use resultset returned by WL.Server.invokeSQLStatement within sql adapter procedure

久未见 提交于 2019-11-28 14:34:32
I want to use the resultSet returned by invoking a SQL statement through WL.Server.invokeSQLStatement statement in a SQL adapter procedure within the procedure itself. I have tried the way we generally do by using result.invocationResult.resultSet[variable].Property inside the SQL adapter procedure, but it doesn't works. HTML <div data-role="page" id="mainPage"> <div data-role="header">search medicine</div> <br> <hr> <div data-role="content"> <input type="text" value="MEDICINE" id="medicine"><hr> <input type="text" value="LOCATION" id="location"><hr> <input type="submit" id="search" value=

Worklight 5.0.6.1 - System.out.println() logging from Worklight adapter is not working

半腔热情 提交于 2019-11-28 13:06:13
I've installed Worklight 5.0.6.1 and when invoking Java code from my adapter I don't see the log output in the workspace\WorklightServetrHome\project\logs log files. I'm using System.out.println(). Any advice why this worked successfully in previous releases of Worklight, and is not working in v5.0.6.1? What the property settings to allow System output from Java code in Worklight that need to be set? FYI: Thinking it might be a bad install I re-installed a second time, and with the same result. The code prior to, and after the System.out.println() calls is executing correctly so I'm sure the

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

余生长醉 提交于 2019-11-28 12:37:46
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 launch or runtime ? Ideally it would be to get and use the domain/hostname value from a drop down or