IOUtils.copy(is, bos);
is.close();
message.setContent(InputStream.class, bos.getInputStream());
String encoding = (String)message.get(Message.ENCODING);
XMLStreamReader xsr;
<BUG>xsr = StaxInInterceptor.getXMLInputFactory(message).

createXMLStreamReader(bos.getInputStream(), encoding);

while (true) {</BUG>
xsr.nextTag();

IOUtils.copy(is, bos);
is.close();
message.setContent(InputStream.class, bos.getInputStream());
String encoding = (String)message.get(Message.ENCODING);
XMLStreamReader xsr;
XMLInputFactory factory = StaxInInterceptor.getXMLInputFactory(message);
synchronized (factory) {
xsr = factory.createXMLStreamReader(bos.getInputStream(), encoding);
}
while (true) {
xsr.nextTag();
