title: How do I test a Spring-WS webservice that Requires soapHeaders?
body: <p>I have a spring-ws (2.0.2) service I have implemented that requires some custom elements in the soap header.  I am trying to use Spring's MockWebServiceClient to generate a valid request to test the dispatcher, marshallers, etc.  </p>
  
  <p>The problem I am getting is that the MockWebSerivce only seems to support the Soap Body (the payload).</p>
  
  <p>How can I access the soap request being generated to get the right headers into it? </p>
  
  <p>If there is a better library for doing this other than Spring's MockWebServiceClient, that would be fine too.</p>
  
  <p>Related Links:
  <a href="http://forum.springsource.org/showthread.php?101708-MockWebServiceClient-amp-WS-Security" rel="nofollow noreferrer">http://forum.springsource.org/showthread.php?101708-MockWebServiceClient-amp-WS-Security</a><br>
  <a href="https://stackoverflow.com/questions/2274378/add-soapheader-to-org-springframework-ws-webservicemessage">Add SoapHeader to org.springframework.ws.WebServiceMessage</a></p>