mobilefirst-adapters

MobileFirst HTTP Adapter: delete/update back-end cookie value

限于喜欢 提交于 2019-12-12 06:04:38
问题 I'm using WL.Server.invokeHttp(options) several times in my adapter. I need to have different values for a given cookie in different calls. If I call WL.Server.invokeHttp({cookies: { mycookie: 'firstValue' } ... the back-end gets this header "cookie": "mycookie=firstValue" , as expected. If I later want to make another call with a different cookie value, WL.Server.invokeHttp({cookies: { mycookie: 'secondValue' } ... the back-end gets this header "cookie": "mycookie=firtsValue; mycookie

Accessing Soap service using java adapter in mobilefirst

雨燕双飞 提交于 2019-12-12 05:08:12
问题 I have written a SOAP WSDL application using mobilefirst by: 1) Using the Discover backend services option 2) Writing my own JavaScript adapter code to follow the documentation provided by IBM. Now my final R&D is to consume this soap service using a java adapter. I have gone through many StackOverflow topics and samples but I haven't been able to find anything related. Can anyone explain the steps to invoke a SOAP-based webservice request using java adapter? 回答1: The following video blog

How to get user id from adapter

偶尔善良 提交于 2019-12-12 04:59:52
问题 Using Mobilefirst Platform 7.1, I have a custom authenticator and login module. It the similar as the sample in the docs I also have an java adapter with an endpoint that is protected with a realm that uses the authenticator and login modules. WLServerAPI serverAPI= WLServerAPIProvider.getWLServerAPI(); @Path("/qdef") @Produces("application/json") @GET @OAuthSecurity(scope="MyAuthenticatorRealm") public Response getQdef(){ SecurityAPI security = serverAPI.getSecurityAPI(); /** Next line

Reading sendFormParameters params for JS Adapter

为君一笑 提交于 2019-12-12 04:20:35
问题 I have javascript WLResourceRequest.POST call at client side. I'm trying to read the received values at server end. On the server side I can to read only "AB". Client side code: var resourceRequest = new WLResourceRequest("/adapters/AdapterNewGet/getFeed", WLResourceRequest.POST); var formParameters={"params":"['AB','CD','EF']")}; resourceRequest.sendFormParameters(formParameters).then(app.onSuccess, app.onFailure); Adapter Side code: function getFeed(tag) { var input = { method : 'get',

IBM worklight:7.1: failure. state: 500, response: The server was unable to process the request from the application. Please try again later

a 夏天 提交于 2019-12-12 04:18:17
问题 I am using mobilefirst 7.1 CLI and have my services running on tomcat. My adapter talks with the services on the servers and gets back the response. I have only desktopbrowser environment in the application (Guessing that should not matter at all). I am getting this error " failure. state: 500, response: The server was unable to process the request from the application. Please try again later." And followed by : Client registration failed with error: {"responseHeaders":{"$WSEP":"","Date":"Mon

Using Worklight(MFP) HTTP Adapters with REST/JSON Services

陌路散爱 提交于 2019-12-12 04:00:42
问题 I'm new to Worklight and I have been trying to run this example: Using IBM Worklight HTTP Adapters with REST/JSON Services. When I run the app on an android emulator and I click a button, I got the following error: alert("mobGmapLatLngFailure") ; in the app in logcat errors: 02-09 04:05:21.924: D/NONE(1435): Client registration failed with error: {"responseHeaders":{},"status":500,"responseText":"","invocationContext":null} 02-09 04:05:22.074: E/NONE(1435): [/apps/services/api/AdapterApp

Calling setActiveUser throws error

廉价感情. 提交于 2019-12-12 03:44:23
问题 I am trying assign a userid to user and I am getting error . I am following as steps below. server details. <realm loginModule="AuthLoginModule" name="AuthRealm"> <className>com.worklight.integration.auth.AdapterAuthenticator</className> <parameter name="login-function" value="AuthAdapter.onAuthRequired"/> <parameter name="logout-function" value="AuthAdapter.onLogout"/> </realm> </realms> <loginModule name="AuthLoginModule"> <className>com.worklight.core.auth.ext.NonValidatingLoginModule<

Calling adapters in “desktop” does not work

那年仲夏 提交于 2019-12-12 03:29:07
问题 Using IBM MobileFirst 7.1 I have created a very simple hybrid project. Then added a very simple java adapter: @Path("/hello") public class BrokenAdapterResource { @GET @Produces("text/plain") public String hello() { return "Hope keeps man alive....!"; } } and also created a MobileFirst environment: "Desktop Browser web page". I try to call the adapter. When I call it from the "common" it works as expected. However when I call it from "desktop" it does not work: var resourceRequest = new

How to use adapters to retrieve SQL Server “image” datatype value

人盡茶涼 提交于 2019-12-12 03:18:32
问题 I want to retrieve data stored in image datatype of SQL Server. But when I invoke adapter all I get is **PHOTO": "[B@62c2805a",** According to this blog we need to get bytes from returned value and it may be java.sql.Blob a simple toString() on the object. https://www.ibm.com/developerworks/community/blogs/dhuyvett/entry/jsonstore_revisited_in_worklight_v6_part_1_the_adapter?lang=en When I tried getting bytes, I got following error Java class \"[B\" has no public instance field or method

Invoking http adapter procedure failure

北战南征 提交于 2019-12-12 02:58:39
问题 I'm trying to send some values to a web server and it is going to respond with true or false using http adapter in ibm mobilefirst. When i invoke the procedure from the environment, i got this error: { "errors": [ "Runtime: Http request failed: java.net.UnknownHostException: mfpreader.comze.com\/" ], "info": [ ], "isSuccessful": false, "warnings": [ ] } Here is the link i'm using: http://mfpreader.comze.com/login.php?username=kevin&password=pass The server is working. LoginAdapter.xml