code: final Document getPayloadDocument() throws ParserConfigurationException,
                                               IOException {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getPayloadDocument");
  
      Document domDoc = null;
  
      // If we already have a Document cached we don't need to build it again
      if (softRefToDocument != null) {
        domDoc = softRefToDocument.get();
      }
  
      // Otherwise we'll take the hit of building it, and cache it in a soft reference
      if (domDoc == null) {
        byte[] bytes = getBytes();
        if ((bytes != null) && (bytes.length > 0)) {
          DocumentBuilderFactory domFactory =DocumentBuilderFactory.newInstance();
          // We need to tell the factory that we want it to be namespace aware.
          domFactory.setNamespaceAware(true);
          DocumentBuilder builder = domFactory.newDocumentBuilder();
          InputStream is = new ByteArrayInputStream(bytes);
          try {
            domDoc = builder.parse(is);
            softRefToDocument = new SoftReference<Document>(domDoc);
          }
          catch (SAXException e) {
            // No FFDC code needed
            // This is not really an error - it just means the data is not XML.
            // As the XPath Expression can't evaluate to True we just set the document to null;
            domDoc = null;
          }
        }
        else {
          domDoc = null;
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getPayloadDocument", domDoc);
      return domDoc;
    }
docs: Return a DOM Document representation of the message payload.
  
  Javadoc description supplied by the JsApiMessageImpl superclass.