title: JAXWS how to print client incoming headers with handler
body: <p>I set up JAXWS handler to validate incoming header from JAXWS client . 
  i wanted to know how to print the headers that are captured in the </p>
  
  <pre><code>handleMessage(SOAPMessageContext context)
  </code></pre>
  
  <p>what i have here :</p>
  
  <pre><code>Boolean isRequest = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
  
          //for response message only, true for outbound messages, false for inbound
          if(!isRequest){
  
          try{
              SOAPMessage soapMsg = context.getMessage();
              SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();
                  SOAPHeader soapHeader = soapEnv.getHeader();
  
                  Iterator&lt;?&gt; i = soapHeader.getChildElements();
                  System.out.println("Number of header elements:  "
                          + countElements(i)); 
  
              }catch(SOAPException e){
                  System.err.println(e);
              }
  
          }
  </code></pre>
  
  <p>how do i extract from the Iterator the headers key and value ?  </p>