Skip Navigation

Sending highlight request to Emulator

You need a working Red App project with an Activator class.

  1. Using Eclipse, add the following required dependencies:

    • com.sabre.edge.cf.core

    • com.sabre.edge.cf.model

    • com.sabre.edge.cf.emu

  1. Add the following Java code to consume a service that is registered with SRWRuntime.

  1. Obtain a reference to ISRWCommunication service:

ISRWCommunication com = Activator.getDefault().getServiceReference(ISRWCommunication.class);
  1. Create an instance of HighlightExtractorServiceClient class and call send() method with an instance of EmuHighlightRequest class.

ClientResponse <EmuHighlightResponse> rsp = new HighlightExtractorServiceClient(com).send(new EmuHighlightRequest());
  1. Retrieve a response to ClientResponse <EmuHighlightResponse> reference.   This class provides simply methods isSuccess() to check for status,   getErrors() retrieving errors (if occurred) and getPayload()to obtain a response.

if (rsp.isSuccess())
{
    showMessage(rsp.getPayload().getText());
}
  1. Create your redapp.xml configuration file and add an Authorization entry to the file to use the host communications service.