title: Soap response iterat in java
body: <p>I am using java soap request and response in my code. I am getting the request and response properly. 
  But I am not able to iterate the response
  Please see my response and code used to iterate below.  Please help me to resolve this issue.      </p>
  
  <p>Response</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;soap:Body&gt;
      &lt;GetUserResponse xmlns="http://XXXX.com/XXXXXXXX.XXXXXXX.WS"&gt;
        &lt;GetUserResult&gt;
          user
            &lt;PersonID&gt;111113&lt;/PersonID&gt;
            &lt;Username&gt;0987654321&lt;/Username&gt;
            &lt;Password /&gt;         
            &lt;FwyMember&gt;Y&lt;/FwyMember&gt;
            &lt;WebMember&gt;Y&lt;/WebMember&gt;
            &lt;FirstName&gt;Mohamed&lt;/FirstName&gt;
            &lt;Tier&gt;firstclass&lt;/Tier&gt;
            &lt;CountryOfResidence&gt;IN&lt;/CountryOfResidence&gt;
            &lt;PreferencesChanged&gt;false&lt;/PreferencesChanged&gt;       
            &lt;FamilyRelationship /&gt;
            &lt;Title&gt;Mr&lt;/Title&gt;
            &lt;MiddleName /&gt;
            ........ continue like this
  </code></pre>
  
  <p>Java code</p>
  
  <pre><code>SOAPBody responseBody = response.getSOAPBody();
  QName bodyName1 = new QName("http://XXXX.com/XXXXXXXX.XXXXXXX.WS","GetUserResponse");
  java.util.Iterator iterator = responseBody.getChildElements(bodyName1);
  while (iterator.hasNext()) {
    SOAPBodyElement responseElement = (SOAPBodyElement)iterator.next();
    String val = responseElement.getValue();
    System.out.println("The values are "+val);
  }
  </code></pre>