General Process for Calling Synchronous Services
You must have a working Red App project with an Activator class.
-
Use Eclipse to add the minimally required dependencies for the synchronous services in your Red App.
-
Create a ServiceContext object.
-
Set the context name of the service to be executed.
-
Create a request object that is specific to the desired service.
-
Set your request to context.
-
Set requestorId.
-
Set authenticationToken.
-
Invoke the process() method on SRWRuntime. This method is in a Sabre Red 360 Activator class.
-
Verify the status and read the response object.
if(context.getStatus() == ServiceStatus.SUCCESS)
{
Response response = context.getResponse();
}
else
{
List<IError> error = context.getErrors();
}