title: How to built SOAP Header namespaces based on the WSDL file
body: <p>I've been experiencing some issues with the header presentation of a SOAP Request. I think I'm missing something.</p>
  
  <p>My (partial) wsdl looks like this:</p>
  
  <pre><code>&lt;wsdl:definitions   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
                      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
                      xmlns:aws="http://xml.xxx.com"
                      xmlns:security_authenticate_6_1="http://xml.xxx.com/VLSSLQ_06_1_1A" 
                      xmlns:security_authenticatereply_6_1="http://xml.xxx.com/VLSSLR_06_1_1A"
                      targetNamespace="http://xml.xxx.com"&gt;  
    &lt;wsdl:types&gt;
      &lt;xsd:schema targetNamespace="http://xml.xxx.com"&gt;
        &lt;xsd:import namespace="http://xml.xxx.com/ws/2009/01/WBS_Session-2.0.xsd" schemaLocation="WBS_Session-2.0.xsd"/&gt;      
        &lt;xsd:import namespace="http://xml.xxx.com/VLSSLQ_06_1_1A" schemaLocation="Security_Authenticate_06_1_1A.xsd"/&gt;
        &lt;xsd:import namespace="http://xml.xxx.com/VLSSLR_06_1_1A" schemaLocation="Security_AuthenticateReply_06_1_1A.xsd"/&gt;
      &lt;/xsd:schema&gt;
    &lt;/wsdl:types&gt;
    &lt;wsdl:message name="Session" xmlns:ns0="http://xml.xxx.com/ws/2009/01/WBS_Session-2.0.xsd"&gt;
      &lt;wsdl:part name="Session" element="ns0:Session"/&gt;
    &lt;/wsdl:message&gt;  
    &lt;wsdl:message name="Security_Authenticate_6_1"&gt;
      &lt;wsdl:part name="Security_Authenticate_6_1" element="security_authenticate_6_1:Security_Authenticate"/&gt;
    &lt;/wsdl:message&gt;
    &lt;wsdl:message name="Security_AuthenticateReply_6_1"&gt;
      &lt;wsdl:part name="Security_AuthenticateReply_6_1" element="security_authenticatereply_6_1:Security_AuthenticateReply"/&gt;
    &lt;/wsdl:message&gt;
    &lt;wsdl:portType name="XXXWebServicesPT"&gt;    
      &lt;wsdl:operation name="Security_Authenticate"&gt;
        &lt;wsdl:input message="aws:Security_Authenticate_6_1"/&gt;
        &lt;wsdl:output message="aws:Security_AuthenticateReply_6_1"/&gt;
      &lt;/wsdl:operation&gt;    
    &lt;/wsdl:portType&gt;
    &lt;wsdl:binding name="XXXWebServicesBinding" type="aws:XXXWebServicesPT"&gt;
      &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;    
      &lt;wsdl:operation name="Security_Authenticate"&gt;
        &lt;soap:operation soapAction="http://webservices.xxx.com/1ASIWJTUTUA/VLSSLQ_06_1_1A"/&gt;
        &lt;wsdl:input&gt;
          &lt;soap:header message="aws:Session" part="Session" use="literal"/&gt;
          &lt;soap:body use="literal"/&gt;
        &lt;/wsdl:input&gt;
        &lt;wsdl:output&gt;
          &lt;soap:header message="aws:Session" part="Session" use="literal"/&gt;
          &lt;soap:body use="literal"/&gt;
        &lt;/wsdl:output&gt;
      &lt;/wsdl:operation&gt;
    &lt;/wsdl:binding&gt;
    &lt;wsdl:service name="XXXWebServices"&gt;
      &lt;wsdl:port name="XXXWebServicesPort" binding="aws:XXXWebServicesBinding"&gt;
        &lt;soap:address location="https://test.webservices.xxx.com"/&gt;
      &lt;/wsdl:port&gt;
    &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>I want to access the Security_Authenticate action, in which case, the header must look something like:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'&gt;
      &lt;soapenv:Header&gt;
        &lt;wbs:Session xmlns:wbs='http://xml.xxx.com/ws/2009/01/WBS_Session-2.0.xsd'&gt;
          &lt;wbs:SessionId&gt;&lt;/wbs:SessionId&gt;
          &lt;wbs:SequenceNumber&gt;&lt;/wbs:SequenceNumber&gt;
          &lt;wbs:SecurityToken&gt;&lt;/wbs:SecurityToken&gt;
        &lt;/wbs:Session&gt;
      &lt;/soapenv:Header&gt;
      &lt;soapenv:Body&gt;
        &lt;vls:Security_Authenticate&gt;
          &lt;vls:tagX&gt;
            &lt;vls:tagY&gt;yyy&lt;/vls:tagY&gt;
            &lt;vls:tagZ&gt;Z&lt;/vls:tagZ&gt;
          &lt;/vls:tagX&gt;
        &lt;/vls:Security_Authenticate&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>How should I built my soapenvelope and my header namespaces?</p>
  
  <p>Thanks.</p>