Is it possible that invoking adapter from separate application? Is there any example for this?
相关问题
- IBM Worklight 6.0 - Worklight Console does not sho
- Output delayed from Cordova Plugin
- Android Application Build with MobileFirst 7.1 is
- Custom ListView in Worklight using Dojo
- How to display a custom keyboard
相关文章
- Unknown realm [myRealm]. null returned for key: is
- How To Calling a Stored Procedure in Worklight
- Worklight 6.0 WL development Server not starting
- How to open the phone dialer?
- Is there a tool to install an existing Cordova 3 p
- Worklight Online + Offline Authentication
- Cannot Call determinedVisibility() never saw a con
- Getting “Cannot install applications because the c
The Nathan answer is perfect. But I'd like to emphasize that from Worklight point view a project represents a configuration unit, so I cannot see any benefits of separating adapters from application in two different projects. On other hands, I can understand that could be 2 projects hosted in two different server that should share the same adapter. Even if it is technically possible, I think that the adapter is not intended to become a reusable service across different worklight instances as a kind of AJAX ESB.
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.com/infocenter/wrklight/v6r1m0/topic/com.ibm.worklight.dev.doc/devref/c_adapter_invocation_service.html), or by right-clicking on the procedure in eclipse and select "Invoke procedure".
For example, try with your browser to go to
http://my-host-name:port/project-name/invoke?adapter=myadapter&procedure=myprocedure
.You could then make an AJAX call to this procedure, or call it from an adapter using invokeHttp.
In any case, you will loose some of the built-in features of the Worklight client, such as authentication handling.