title: Parsing thru SOAPMessage response, convert it to String XML and get Node values
body: <p>I am using this method for converting a SOAPMessage response to XML String. After converting I need to get particular nodes values.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    /**
    * Method used to convert the response to XML string
    */
       private String getSOAPResponseString(SOAPMessage soapResponse) throws Exception {
    StringWriter sw = new StringWriter();
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    Source sourceContent = soapResponse.getSOAPPart().getContent();
    StreamResult result = new StreamResult(sw);
    transformer.transform(sourceContent, result);
    //System.out.println(sw.toString());
    //System.out.println(soapResponse.getMimeHeaders());
    return sw.toString();
   }
     </code></pre>
  </div>
  </div>
  </p>
  
  <p>I check for this Node from the XML String.But it is not always coming as </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>String responseMsg = response.substring(response.indexOf("&lt;providerReturnMessage&gt;") + "&lt;providerReturnMessage&gt;".length() ,            response.indexOf("&lt;/providerReturnMessage&gt;"));
      </code></pre>
  </div>
  </div>
  </p>
  
  <p>sometimes it has a prefix in front of it like this
      <code>&lt;axis2ns7:providerReturnMessage&gt;, &lt;axis2ns8:providerReturnMessage&gt;</code> , How can I read the message text in this Node ignoring the prefix in front.</p>