worklight-adapters

Invoking a worklight adaptor from a stand alone java program

让人想犯罪 __ 提交于 2019-12-11 17:58:39
问题 I can invoke the worklight adaptor procedure in my machine by using the below URL. http://192.168.1.101:10080/AdaptorUI/dev/invoke?adapter=MySQLAdaptor&procedure=procedure1&parameters=[] Now, i want to invoke this from a java program. Code goes like this, try { URL myURL = new URL("http://192.168.1.101:10080/AdaptorUI /dev/invoke?adapter=MySQLAdaptor&procedure=procedure1&parameters=[]"); URLConnection myURLConnection = myURL.openConnection(); myURLConnection.connect(); } catch

Worklight 6.2 - Broadcast notification not being sent

非 Y 不嫁゛ 提交于 2019-12-11 16:18:20
问题 We are trying to run the sample app for push notifications with some modification to get it to send out a broadcast notification, but it is not getting sent. We have modified the PushBackendEmulator code as well. The emulator invokes the submitBroadCastNotification procedure successfully and the following result is returned: Server response :: / -secure-{"result":"Notification sent to all users","isSuccessful":true} / However, it appears the WL.Server.sendMessage method is not sending the

worklight adapter

孤街浪徒 提交于 2019-12-11 15:09:08
问题 I am getting a problem in worklight adapter , In the following http adapter method ,it is showing The mandatory parameter 'action' is missing , returning statusCode as 500 and statusReason as " Internal Server Error ". I had given all the user credentials correctly in adapter xml file, but I don't know why I'm getting this error. Code: function actionOnProcessInstance() { var param = "/rest/bpm/bfm/v1/process/_PI:9003013d.4387342e.1efe573f.7c20307?action=resume"; var input = { method : 'put',

Get PDF files from Worklight Server to the client

强颜欢笑 提交于 2019-12-11 14:58:15
问题 Based on the following reference:- Worklight Adapter getting pdf file from rest service, i got the PDF file from tomcat server through the worklight adapter. The server side code is:- var input = { method : 'get', returnedContentType : 'plain', path : '/PDF/example-abstract.pdf' }; return WL.Server.invokeHttp(input); When i invoke the invoke the procedure i am able to successfully retrieve the result. When i invoke the same procedure from client side like below:- var invocationData = {

How can i call adapter from another worklight project?

拟墨画扇 提交于 2019-12-11 07:00:08
问题 Is it possible that invoking adapter from separate application? Is there any example for this? 回答1: Do you mean separate application within the same worklight project? Or a different worklight project? If same Worklight project, then yes, the scope of an adapter is on the entire project. If a different project, ideally you would not. However an adapter is still a simple HTTP service that you could potentially call manually. Find the correct URL for your procedure call (see http://pic.dhe.ibm

IBM Worklight - How to call a Stored Procedure with the “OUT” parameter?

冷暖自知 提交于 2019-12-11 05:43:14
问题 We using a SQL adapter and I'm getting the below error while invoking the Stored Procedure. we Our database is Oracle 11g. Below is our adapter and procedures. function deals(param) { return WL.Server.invokeSQLStoredProcedure({ procedure : "deals_proc", parameters : [] }); } and the procedure is create or replace procedure deals_proc(c1 out sys_refcursor ) AS begin open c1 for select CATEGORYNAME from DEALS; end deals_proc; and the error 'm getting is { "errors": [ "Runtime: Failed to

IBM Worklight - Error while trying to deploy application/adapter

我的未来我决定 提交于 2019-12-11 02:15:11
问题 I have created a database using the Phpmyadmin (xampp server). Database name = 'database' Username = 'user' Password is empty. When I tried to change the worklight.properties file, it says some Poolable connection error: [ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Project not initialized at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110) at com.ibm.ws

Worklight Adapter override adapter xml

瘦欲@ 提交于 2019-12-11 00:59:39
问题 Worklight 6.1 Once an adapter is deployed is it possible programmatically from within an adapters procedure to override the and that was previously defined in the adapters xml? Thanks 回答1: 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

IBM Worklight 6.0 - Adapter with basic auth doesn't update auth header if client logs out/in

喜你入骨 提交于 2019-12-11 00:08:34
问题 I have a Worklight v6.0 application using adapter-based authentication. The adapter is an HTTP adapter that calls a backend REST service using Basic Auth. There is no session or cookies between the adapter and the backend service. In my Adapter descriptor, I have set the cookiePolicy to IGNORE_COOKIES. Each request from the adapter to the backend is authenticated with the basic auth header on that request. Each of the adapter's procedures has connectAs set to: endUser. <?xml version="1.0"

IBM Worklight 6.0 - wl_antiXSRFRealm error after deploying adapter to Worklight Server

守給你的承諾、 提交于 2019-12-08 12:52:33
问题 I am currently working on a push notifications demo using Worklight v6.0 Enterprise Edition. As part of the demo, I created a new Worklight project in Worklight studio. I also imported the push notifications sample project into the same workspace I copied the supplied authenticationConfig.xml file from the push notification sample project into my new project (replacing the file) I also modified the application-descriptor.xml in my new project to reference the securityTest in the