Link[] isolateLinks = LinkPortal.getLinks();
NamedLinkPortal.receiveLinks(isolateLinks[0]);
SystemServiceRequestor serviceRequestor =
SystemServiceRequestor.getInstance(token);
SystemServiceConnection con = null;
con = serviceRequestor.requestService(
TestSystemService.SERVICE_ID);
try {
// receive string from service
SystemServiceMessage msg = con.receive();
String testString = msg.getDataInput().readUTF();
// convert string to upper case and sent it back to service
msg = SystemServiceMessage.newMessage();
msg.getDataOutput().writeUTF(testString.toUpperCase());
con.send(msg);
} catch (Throwable t) {
System.err.println("Exception: " + t);
}