// Check to see if we have an input or output message and handle the return type
// appropriately
boolean isInputMessage = (Boolean) mc.get(ObjectMessageContext.MESSAGE_INPUT);
if (!isInputMessage && callback.getWebResult() != null && !hasOutParamReturn) {
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
writeObjectToStax(corbaCtx.getMessage().getStreamableReturn().getObject(),
evtWriter, XMLEventFactory.newInstance(), false);
evtWriter.flush();
ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());