worklight-adapters

Worklight Adapter getting pdf file from rest service

白昼怎懂夜的黑 提交于 2019-11-28 10:10:15
问题 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",

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

不羁岁月 提交于 2019-11-28 06:57:35
问题 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

Calling Worklight adapter from external app

那年仲夏 提交于 2019-11-28 05:04:51
问题 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>

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

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

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

别来无恙 提交于 2019-11-27 08:29:01
问题 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">

Making web service calls to a HTTPS server from Worklight Adapter - javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

做~自己de王妃 提交于 2019-11-27 08:12:14
问题 I am trying to hit a REST based HTTPS service from my adapter and my .xml file looks like this, <connectionPolicy xsi:type="http:HTTPConnectionPolicyType"> <protocol>https</protocol> <domain>myco.company.com</domain> <port>443</port> <!-- Following properties used by adapter's key manager for choosing specific certificate from key store <sslCertificateAlias></sslCertificateAlias> <sslCertificatePassword></sslCertificatePassword> --> </connectionPolicy> <loadConstraints

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

回眸只為那壹抹淺笑 提交于 2019-11-27 07:26:00
问题 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

Insertion of values in database

丶灬走出姿态 提交于 2019-11-27 05:41:13
Hey I am using IBM Worklight V6.2.I want to insert values into database My Html Code is <h1>Please Enter The Car Details</h1> <form > Car No:<input type="number" id="carnum" placeholder="Please enter your no" ><br><br> Details:<input type="text" id= "details" placeholder="Please enter car details" > <br><br> <input type="submit" value="Register" onclick="loadFeeds1()"> </form> My procedure is: var users = WL.Server.createSQLStatement("insert into car(carno,details) values (?,?)"); function getusers(carno,details) { return WL.Server.invokeSQLStatement({ preparedStatement : users, parameters :