how to read http response soap headers from web service response in proxy class

Posted by Fabricio on Stack Overflow See other posts from Stack Overflow or by Fabricio
Published on 2010-05-03T20:39:52Z Indexed on 2010/05/04 13:28 UTC
Read the original article Hit count: 348

Filed under:
|
|
|
|

I'm having some problems with one webservice that i'm working with. I generated a proxy class with wsdl.exe that comes with .net framework. But that webservice return a header that isnt not mapped by the wsdl. I must map the header sop because it contains some properties that i have to read and work with. how can i read the soap's header collection?

Ex.:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header xmlns="http://xml.amadeus.com/ws/2009/01/WBS_Session-2.0.xsd">
      <Session>
         <SessionId>545784545</SessionId>
         <SequenceNumber>1</SequenceNumber>
         <SecurityToken>asd7a87sda89sd45as4d5a4</SecurityToken>
      </Session>
   </soap:Header>
   <soap:Body>
      <TAM_Altea_Seguranca_AutenticarRS xmlns="http://xml.amadeus.com/2009/04/TAM/TAM_Altea_Seguranca_AutenticarRS_2.0">
         <statusDoProcesso>
            <codigoDoStatus>P</codigoDoStatus>
         </statusDoProcesso>
      </TAM_Altea_Seguranca_AutenticarRS>
   </soap:Body>
</soap:Envelope>

I need to read the SOAP:HEADER -> Session.

© Stack Overflow or respective owner

Related posts about c#

Related posts about webservices