IBM worklight - "adapter not found, procedure invocation error" - ibm-mobilefirst

I am trying to implement form-based authentication using IBM worklight.
While executing it, it is showing 'adapter not found' & 'procedure invocation error'.
Kindly share the link to learn "IBM worklight" for beginners.

It'd be better to supply the full error that can be seen in the server logs as well as in Chrome's DevTools console.
Verify the following:
The adapter was indeed deployed, by right-clicking on the adapter folder and selecting Run As > Deploy adapter
That your adapter procedure invocation mentions the correct adapter name (check for spelling errors)
To learn more, visit the Developer Center: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-all-tutorials-7-0/

Related

Endeca-Hybris integration not working

i'am trying to integrate hybris 4.7.9 with endeca. I have installed the following endeca components. 1)MDEX engine 2)Platform services 3)Endeca workbench 4)CAS.
I have deployed a sample application on endeca side using "D:\Endeca\ToolsAndFrameworks\11.0.0\deployment_template\bin\deploy.bat"
In Hyend2 in admincockpit of hybris
I have made EAC/CAS connection with my appication and made a export job.
Problem is i am not able to run that job, it reports me following error:
http://localhost:8500/MyAppen_en_data/?wsdl returned response code 404
at com.endeca.itl.service.ServiceLocator.getService(ServiceLocator.java:150)
I don't know Hybris, but since the error is related to Endeca, let me try to give some pointers.
CAS: Check that CAS is up and running
App Name: You might have specified app-name-with-locale (MyAppen) somewhere where you need to specify only app-name (MyApp). [The Endeca app name without the locale is called as "Base Application Name". Go back and check all your configurations in Hybris and Endeca].
You may also refer to this blog (Although it is for ATG framework, it should give idea for Hybris as well).

Worklight LDAP Error

When trying the LDAP sample project provided by Worklight, I get the following error:
[ERROR ] FWLSE0020E: Ajax request exception: Adapter 'DummyAdapter'
does not exist [project module_23_2_LDAPLoginModule] [ERROR ]
FWLSE0117E: Error code: 1, error description: INTERNAL_ERROR, error
message: FWLSE0069E: An internal error occurred during gadget request
[project module_23_2_LDAPLoginModule]Adapter 'DummyAdapter' does not
exist, User Identity {SubscribeServlet=null, LDAPRealm=null,
wl_authenticityRealm=null, wl_remoteDisableRealm=null,
wl_antiXSRFRealm=(name:rtm5uf72muh56gak3ms4gvvt42,
loginModule:WLAntiXSRFLoginModule),
wl_deviceAutoProvisioningRealm=null,
wl_deviceNoProvisioningRealm=null,
myserver=(name:776c1909-3ae4-45b5-a029-f0372b507a7d,
loginModule:WeakDummy),
wl_anonymousUserRealm=(name:776c1909-3ae4-45b5-a029-f0372b507a7d,
loginModule:WeakDummy)}. [project module_23_2_LDAPLoginModule]
com.worklight.common.log.filters.ErrorFilter
In order to make it work, what values do I need to change. I want to use my IBM LDAP server.
Thanks..Johnson
At least by reading the error message, it is pretty clear.
Did you make sure to also deploy the adapter and not just the application?
In your Worklight project, find the adapters folder. Open it. Then, right-click on the adapter folder within and select Run As > Deploy Worklight adapter.
Try the application again and see if it works, or if there are other errors displayed.
I suggest that instead of jumping right into what you want to do in your app, first learn the basics. Review the IBM Worklight Getting Started training modules, from the top.

IBM Worklight - Error while validating project during deployment

I have created an application using IBM worklight and i am using customAuthenticator for login process
I am getting following validation error while deploying application
Security test DummyAdapter-securityTest must include user and device
realms for AuthDemo:iphone:1.0:api. [project
module_23_1_CustomLoginModule]
You need to re-read the entire Getting Started section about Authentication and Security. There is more reading material here and here.
From the error I am thinking you have added a securityTest="DummyAdapter-securityTest" attribute to your iphone element in application-descriptor.xml.
As noted by the name of the securityTest, it is not meant for the application but for the adapter. This securityTest is already defined for the adapter procedure in the adapter XML file. Remove the securityTest you've added and it will work.
The sample you are trying to run (module_23_1_CustomLoginModule) is ready-made; no need for editing. You need only to build & deploy and run it.

IBM Worklight 5.0.x - How to use console API for automation?

I'm looking for examples to control Worklight appclications via REST API for automation. What I need is a method to disable and enable specific application from command line.
I've found "HTTP Interface of the production server" on the IBM Worklight Information Center, but it doesn't work.
For exapmle, I sent a GET request to:
<WorklightServerURL>/worklight/console/api/getApplications
In return I got:
Error 404: Could not find resource for relative : /getApplications of
full path:
/worklight/console/api/getApplications".
Looking into the Worklight Console interactions using Chrome developer tool, disabling application request generates:
<WorklightServerURL>/worklight/console/api/applications/setAccessRule/17
Which is not consistent with the IBM Worklight Information Center...
This looks to be a documentation defect, where (in this specific case):
http://myhost:port/console/api/{Action}
Should be
http://myhost:port/console/api/applications/{Action}
For example:
http://myworklightserver:8080/console/api/applications/all
http://myworklightserver:8080/console/api/applications/get/testapp
I have opened a documentation defect to update the Console API Requests section. Thanks.
As for setAccessRule,
The API request structure is: http://myworklightserver:8080/console/api/applications/setAccessRule
The parameters are:
gadgetAppId (Required. You can find this in the database)
action (Required. delete | notify | block)
message (Required)
downloadLink (Optional)
Note that you are linking to the Worklight 5.0.5 Information Center; the fixes will appear in the Worklight 5.0.6 and 6.0 Information Center pages.
In Worklight 6.0 the port has changed to "10080", and a context root section exists before "/console".
http://myworklightserver:10080/mycontext/console/api/applications/all

IBM Worklight - Error 405 HTTP method POST is not supported by this URL

I've encountered a problem during development.
When the adapter is tested from within Eclipse ("Invoke Worklight procedure"), it does its job perfectly.
On the contrary, when the adapter is called from the app, it doesn't work. I receive the following error:
Error 405 HTTP method POST is not supported by this URL
I've noticed a strange thing. When the adapter is called from the test procedure the URL seems correct (/apps/services/api/...) In the other case, Worklight puts a worklight prefix (/worklight/apps/services/api/...) when it makes the call. Hence the URL cannot be reached.
Here Worklight Studio - error http 405 when connecting to mobile URL provided by Console I found a partial solution but it does not work.
Additional info
WL version is 5.0.6.
Application server is Tomcat 7.
Based on my experiments I found the problem.
Each worklight project has an application-descriptor.xml. Within it there is a tag that indicates the WL server root URL.
Since I've taken the project from another source, I've simply noticed that it was configured as
<worklightServerRootURL>http://sampleDomain/worklight</worklightServerRootURL>
where sampleDomain is only a placeholder for the real one.
Now it is configured like
<worklightServerRootURL>http://${local.IPAddress}:8080</worklightServerRootURL>
to perform internal local tests.
Hope it helps.