axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <>
Subject RE: Accessing SOAP Message Header
Date Wed, 14 Jan 2004 15:28:00 GMT



              MessageContext ctx =


              // Get SOAP envelope of request

              SOAPEnvelope env = ctx.getRequestMessage().getSOAPEnvelope();


              // Get Header

              SOAPHeaderElement soapHeaderElement =
env.getHeaderByName(headerNamespace, headerName);


Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Ransel Lopez [] 
Sent: Tuesday, January 13, 2004 6:02 PM
Subject: Accessing SOAP Message Header


Hi all:


How can I access to the header of a client request?? I mean, for example: my
client always send me some information and I don't need it like a parameter
(for example a sessionID). Clients are going to send that info as a header
parameter. How can I access that info at the server side??



<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="
<> " 
<> " 
<http://localhost:8080/mycompany/services/myservice> " 
<http://localhost:8080/mycompany/services/myservice/encodedTypes> " 
<> " 
<> ">
   <tns:headerStruct id="session_id">
 <soap:Body soap:encodingStyle="
<> ">
   <q1:logout xmlns:q1=" <> ">

In red is the info that I need to access


Thank you for you help!!!

Ransel López, Web Services Developer

Time Industrial, Inc.
 An Outsourced Contractor Time and Cost Tracking Service.
tel: 780.413.1521  fax: 780.413.0474 <>  

 This message and attached files, if any, is (are) intended only for the
addressee(s) and may 
 contain privileged or confidential information. Any unauthorized disclosure
is strictly prohibited. 
 If destined to our legal counsel, this transmission is privileged
communication as between an 
 attorney and its client.
 If you have received this message in error, please notify us immediately so
that we may correct 
 our internal records. Please then delete the original message. Thank you.



View raw message