The service to call. Only the whitelisted services can be called.
The function to call from this service.
(Optional) Any quantity of additional parameters for this function
Service Parameter and Whitelisted Services
The whitelisted OSGi services that you can pass as the
service parameter follow. For more information about these services, see OSGi Whitelisted Services.
This parameter is the name of the method that you want to call. This must be a public method that is declared in the service interface that you are calling.
If the calling method expects one or more arguments, pass the arguments as subsequent parameters of the SrwOSGiApi.callOSGIService function. These parameters must be the following types:
JSON String is decoded into Java objects.
The SrwOSGiApi.callOSGIService() method returns a JSON String object, even if the method result is
Create an editor in your main Red App plug-in using the following class:
DefaultWebkitEditor. (For information about a default editor implementation, see Integrating a Web App Using a Default Editor.
(Optional) If your web app will be opened in a view, create a view using the following class.
WebkitView (This is located in com.sabre.edge.platform.optional.webkit.views.WebkitView ). For information about a default view implementation, see Integrating a Web App Using a Default View.
The sample code below displays an alert with the Agent ID in
var result = SrwOSGiApi.callOSGIService("com.sabre.edge.platform.core.sso.base.IAgentProfileService","getAgentId"); result = eval( "(" result ")" ); alert(result.string);