System.out.println("unable to load configuration file, "
+ "default settings will be used");
}
String msgBoxId = UUID.randomUUID().toString();
MsgBoxClient client = new MsgBoxClient();
EndpointReference msgBoxEpr = client.createMessageBox(configurations
.getProperty(ConfigKeys.MSGBOX_SERVICE_URL), 500L);
try {
client.storeMessage(msgBoxEpr, 500L, MsgBoxUtils
.reader2OMElement(new StringReader(
"<test>A simple test message</test>")));
} catch (XMLStreamException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Iterator<OMElement> iterator = client.takeMessagesFromMsgBox(msgBoxEpr,
500L);
int i = 0;
if (iterator != null)
while (iterator.hasNext()) {
i++;