// Wait until the top level service returns its metadata
waitUntilInitialized();
CAS cas = eeUimaEngine.getCAS();
// Send request out and save Cas Reference id
String casReferenceId = eeUimaEngine.sendCAS(cas);
// Spin a callback listener thread
Thread t = new Thread(listener);
t.start();
// Wait for reply CAS. This method blocks
String cRefId = listener.getCasReferenceId();