XML : AXIS2 SOAP XML tag order change with java 8

I have a piece of code, where the AXIS2 SOAP envelope is converted to a string and is finally put to a file for tracing.

                  if (messageTraceLogger.isTraceEnabled()) {                  ByteArrayOutputStream out = new ByteArrayOutputStream();                  String xml = null;                  msgContext.getEnvelope().serialize(out);                  XMLPrettyPrinter.prettify(msgContext.getEnvelope(), out);                  xml = out.toString("UTF-8");                    // Output the trace                  traceLogger.trace("{}\n{}", requestFormatter.format(messageAttributes), xml);              }    

When I run with Java 7 the xml tags come in one order, but with Java 8 with a completely different order.

I suspect difference in hash order can be the root cause Performance Improvement for HashMaps. But I am not quite sure. Any leads?

No comments:

Post a Comment