final Message responseMessage = requestHandler.handle
((MBeanServerRequestMessage)requestMessage);
/* BEGIN -- S1WS_MOD */
drainInputStream(); // Since, in.close only reads byte by byte.
JMXInbandStream.setIncomingStream(null);
MBeanServerResponseMessage tempMsg =
(MBeanServerResponseMessage) responseMessage;
StreamMBeanServerResponseMessage resmsg =
new StreamMBeanServerResponseMessage(
tempMsg.getMessageId(),
tempMsg.getWrappedResult(),
tempMsg.isException());
InputStream in = JMXInbandStream.getOutgoingStream();
if (in != null) {
resmsg.setStreamAvailable(true);
}
OutputStream out = response.getOutputStream();