public boolean handleMessage(LogicalMessageContext ctx) {
super.handleMessage(ctx);
try {
Boolean outbound = (Boolean)ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (outbound) {
LogicalMessage msg = ctx.getMessage();
assertNotNull("logical message is null", msg);
JAXBContext jaxbCtx = JAXBContext.newInstance(PackageUtils
.getPackageName(PingOneWay.class));
PingResponse resp = new PingResponse();
resp.getHandlersInfo().add(clientHandlerMessage);
msg.setPayload(resp, jaxbCtx);
return false;
}
} catch (Exception e) {
e.printStackTrace();
fail(e.toString());