1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java Thu Aug 08 10:10:38 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java Fri Aug 23 09:57:21 2013 +0100 1.3 @@ -81,10 +81,27 @@ 1.4 } 1.5 1.6 return toString(packet.getMessage()); 1.7 + } 1.8 1.9 + public static String toStringNoIndent(Packet packet) { 1.10 + if (packet == null) { 1.11 + return "[ Null packet ]"; 1.12 + } else if (packet.getMessage() == null) { 1.13 + return "[ Empty packet ]"; 1.14 + } 1.15 + 1.16 + return toStringNoIndent(packet.getMessage()); 1.17 } 1.18 1.19 public static String toString(Message message) { 1.20 + return toString(message, true); 1.21 + } 1.22 + 1.23 + public static String toStringNoIndent(Message message) { 1.24 + return toString(message, false); 1.25 + } 1.26 + 1.27 + private static String toString(Message message, boolean createIndenter) { 1.28 if (message == null) { 1.29 return "[ Null message ]"; 1.30 } 1.31 @@ -94,7 +111,9 @@ 1.32 XMLStreamWriter writer = null; 1.33 try { 1.34 writer = xmlOutputFactory.createXMLStreamWriter(stringOut); 1.35 - writer = createIndenter(writer); 1.36 + if (createIndenter) { 1.37 + writer = createIndenter(writer); 1.38 + } 1.39 message.copy().writeTo(writer); 1.40 } catch (Exception e) { // WSIT-1596 - Message Dumping should not affect other processing 1.41 LOGGER.log(Level.WARNING, "Unexpected exception occured while dumping message", e);