--- old/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java 2014-03-28 17:28:26.000000000 +0100 +++ new/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java 2014-03-28 17:28:26.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -245,12 +245,18 @@ * getBytes() is called on a ByteInputStream. */ if (!(is instanceof ByteInputStream)) { - ByteOutputStream bout = new ByteOutputStream(); - bout.write(is); + ByteOutputStream bout = null; + try { + bout = new ByteOutputStream(); + bout.write(is); - // source.setInputStream(new ByteInputStream(...)) - FastInfosetReflection.FastInfosetSource_setInputStream( - source, bout.newInputStream()); + // source.setInputStream(new ByteInputStream(...)) + FastInfosetReflection.FastInfosetSource_setInputStream( + source, bout.newInputStream()); + } finally { + if (bout != null) + bout.close(); + } } this.source = source; } @@ -811,4 +817,6 @@ public String getSourceCharsetEncoding() { return sourceCharsetEncoding; } + + public abstract String getSOAPNamespace(); }