title: How to Get SoapHeader on JaxWS WebService
body: <p>I have one webservice jax-ws and i need get soap header, i make this:</p>
  
  <pre><code>@Resource
  private WebServiceContext context;
  
  MessageContext msContext = context.getMessageContext();
  SOAPMessageContext soapMsgContext = (SOAPMessageContext) msContext;
  SOAPHeader soapHeader = soapMsgContext.getMessage().getSOAPHeader();
  Iterator it=soapHeader.extractAllHeaderElements();
  </code></pre>
  
  <p>but i have problem to cast MessageContext to SoapMessageContext, and i can't make SoapHandler because i can't send object from handler to webservice because to send i need put de object on Application Scope and i not want that.</p>