Analiza odpowiedzi SOAP w Javie

Nie udało mi się przeanalizować odpowiedzi SOAP w Javie (używając Bonita Open Solution BPM). Mam następującą odpowiedź SOAP (wyszukiwanie dokumentu w IBM Content Manager; odpowiedź SOAP zwraca 1 pasujący dokument)

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:RunQueryReply xmlns="http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema" xmlns:ns1="http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema">
         <ns1:RequestStatus success="true"></ns1:RequestStatus>
         <ns1:ResultSet count="1">
            <ns1:Item URI="http://xxxx/CMBSpecificWebService/CMBGetPIDUrl?pid=96 3 ICM8 ICMNLSDB16 ICCSPArchivSuche59 26 A1001001A12D18B30015E9357518 A12D18B30015E935751 14 1087&amp;server=ICMNLSDB&amp;dsType=ICM">
               <ns1:ItemXML>
                  <ICCSPArchivSuche ICCCreatedBy="EBUSINESS\iccadmin" ICCCreatedDate="2012-04-18T10:51:26.000000" ICCFileName="Golem_Artikel.txt" ICCFolderPath="" ICCLastModifiedDate="2012-04-18T10:51:28.000000" ICCLibrary="Dokumente" ICCModifiedBy="EBUSINESS\iccadmin" ICCSharePointGUID="c43f9c93-a228-43f9-8232-06bdea4695d1" ICCSharePointVersion="1.0   " ICCSite="Archiv Suche" cm:PID="96 3 ICM8 ICMNLSDB16 ICCSPArchivSuche59 26 A1001001A12D18B30015E9357518 A12D18B30015E935751 14 1087" xmlns:cm="http://www.ibm.com/xmlns/db2/cm/api/1.0/schema">
                     <cm:properties type="document">
                        <cm:lastChangeUserid value="ICCCMADMIN"/>
                        <cm:lastChangeTime value="2012-04-18T11:00:15.914"/>
                        <cm:createUserid value="ICCCMADMIN"/>
                        <cm:createTime value="2012-04-18T11:00:15.914"/>
                        <cm:semanticType value="1"/>
                        <cm:ACL name="DocRouteACL"/>
                        <cm:lastOperation name="RETRIEVE" value="SUCCESS"/>
                     </cm:properties>
                     <cm:resourceObject CCSID="0" MIMEType="text/plain" RMName="rmdb" SMSCollName="CBR.CLLCT001" externalObjectName=" " originalFileName="" resourceFlag="2" resourceName=" " size="702" textSearchable="true" xsi:type="cm:TextObjectType">
                        <cm:URL value="http://cmwin01.ebusiness.local:9080/icmrm/ICMResourceManager/A1001001A12D18B30015E93575.txt?order=retrieve&amp;item-id=A1001001A12D18B30015E93575&amp;version=1&amp;collection=CBR.CLLCT001&amp;libname=icmnlsdb&amp;update-date=2012-04-18+11%3A00%3A15.001593&amp;token=A4E6.IcQyRE6_QbBPESDGxK2;&amp;content-length=0"/>
                     </cm:resourceObject>
                  </ICCSPArchivSuche>
               </ns1:ItemXML>
            </ns1:Item>
         </ns1:ResultSet>
      </ns1:RunQueryReply>
   </soapenv:Body>
</soapenv:Envelope>

Chciałbym uzyskać nazwę pliku (ICCFileName = "Golem_Artikel.txt") i adres URL tego pliku (<cm: URL value = "http: //cmwin01.ebusiness.local: 9080 / icmrm / ICMResourceManager / A10...) w łańcuchu Zmienne używające Java. Przeczytałem kilka artykułów na ten temat (Nie można przetworzyć odpowiedzi SOAP , Jak wykonać analizę składniową odpowiedzi SOAP) ale bez powodzenia. Oto, co próbowałem:

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;

// Clean response xml document
responseDocumentBody.normalizeDocument();
// Get result node
NodeList resultList = responseDocumentBody.getElementsByTagName("ICCSPArchivSuche");
Element resultElement = (Element) resultList.item(0);
String XMLData = resultElement.getTextContent();

// Check for empty result
if ("Data Not Found".equalsIgnoreCase(XMLData))
    return null;


DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
InputSource inputSource = new InputSource();
inputSource.setCharacterStream(new StringReader(XMLData));
Document doc = documentBuilder.parse(inputSource);
Node node = doc.getDocumentElement();
String result =  doc.getNodeType();


return result;

Od Bonity otrzymuję tylko odpowiedźDocumentBody lub responseDocumentEnvelope (org.w3c.dom.Document) jako odpowiedź na usługę sieciową. Dlatego muszę przejść z treści SOAP do moich zmiennych. Byłbym zadowolony, gdyby ktoś mógł pomóc.

Z poważaniem

questionAnswers(3)

yourAnswerToTheQuestion