[Xml-compile] Custom SOAP11 header
    Kaare Rasmussen 
    kaare at jasonic.dk
       
    Tue Nov  2 06:08:28 GMT 2010
    
    
  
> You may also modify your WSDL to list these header fields. Of course,
> the only correct solution, but often not feasable.
The header is isted:
      <s:element name="AuthHeader" type="tns:AuthHeader" />
      <s:complexType name="AuthHeader">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="UserName" 
type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="Password" 
type="s:string" />
        </s:sequence>
        <s:anyAttribute />
      </s:complexType>
... later ...
  <wsdl:message name="GetCompanyByIDSoapIn">
    <wsdl:part name="parameters" element="tns:GetCompanyByID" />
  </wsdl:message>
  <wsdl:message name="GetCompanyByIDSoapOut">
    <wsdl:part name="parameters" element="tns:GetCompanyByIDResponse" />
  </wsdl:message>
  <wsdl:message name="GetCompanyByIDAuthHeader">
    <wsdl:part name="AuthHeader" element="tns:AuthHeader" />
  </wsdl:message>
... later ...
    <wsdl:operation name="GetCompanyByID">
      <soap:operation soapAction="http://..../GetCompanyByID" style="document" 
/>
      <wsdl:input>
        <soap:body use="literal" />
        <soap:header message="tns:GetCompanyByIDAuthHeader" part="AuthHeader" 
use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
Perhaps my problem in this case is that I don't know how to send a soap:hader 
message ? It seems to be declared beautifully.
-- 
Med venlig hilsen
Kaare Rasmussen, Jasonic
Jasonic                 Telefon: +45 3816 2582
Nordre Fasanvej 12
2000 Frederiksberg      Email: kaare at jasonic.dk
    
    
More information about the Xml-compile
mailing list