axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ransel Lopez" <rlo...@timeindustrial.com>
Subject RE: Accessing SOAP Message Header
Date Wed, 14 Jan 2004 23:31:07 GMT
Thank you very much guys: Tom, Rommel and Jim...


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
 http://www.TimeIndustrial.com <http://www.timeindustrial.com/>  

 -----------------------------------------------------------------------------------------
 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.

 
  

	-----Original Message-----
	From: axis-dev-return-26632-rlopez=timeindustrial.com@ws.apache.org [mailto:axis-dev-return-26632-rlopez=timeindustrial.com@ws.apache.org]
On Behalf Of Tom Jordahl
	Sent: Wednesday, January 14, 2004 8:28 AM
	To: 'axis-dev@ws.apache.org'
	Subject: RE: Accessing SOAP Message Header
	
	

	 

	Try:

	 

	              MessageContext ctx = org.apache.axis.MessageContext.getCurrentContext();

	  

	              // 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 [mailto:rlopez@timeindustrial.com] 
	Sent: Tuesday, January 13, 2004 6:02 PM
	To: axis-dev@ws.apache.org
	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??

	 

	Example:

	<?xml version="1.0" encoding="utf-8"?>
	<?xml version="1.0" encoding="utf-16"?>
	<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
	        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
	        xmlns:tns="http://localhost:8080/mycompany/services/myservice" 
	        xmlns:types="http://localhost:8080/mycompany/services/myservice/encodedTypes" 
	        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	 <soap:Header>
	   <tns:headerStruct id="session_id">
	     <session_id xsi:type="xsd:string">DguSIHKFbhUZJygsKissLUR2MxA=</session_id>
	   </tns:headerStruct>
	 </soap:Header>
	 <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	   <q1:logout xmlns:q1="http://my.company.com <http://my.company.com/> ">
	   </q1:logout>
	 </soap:Body>
	</soap:Envelope>

	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
	 http://www.TimeIndustrial.com <http://www.timeindustrial.com/>  
	
	 -----------------------------------------------------------------------------------------
	 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.

	 
	  

	 


Mime
View raw message