# How can I parse Soap envelope to get values in SOAP header?

**URL:** <https://www.ruby-forum.com/t/how-can-i-parse-soap-envelope-to-get-values-in-soap-header/122399>\
**Category:** Rails\
**Created:** [December 7, 2007, 9:12am UTC](https://www.ruby-forum.com/t/how-can-i-parse-soap-envelope-to-get-values-in-soap-header/122399 "2007-12-07T09:12:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![suparna](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@suparna](https://www.ruby-forum.com/u/suparna)\
**Post date:** [December 7, 2007, 9:12am UTC](https://www.ruby-forum.com/t/how-can-i-parse-soap-envelope-to-get-values-in-soap-header/122399/1 "2007-12-07T09:12:09Z")

</div>

I have incoming SOAP request header with me. I want to parse it so as to  
read the values in header.  
The envelope i have is :  
\<SOAP-ENV:Envelope  
xmlns:SOAP-ENV=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”  
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”  
xmlns:xsi=“[http://www.w3.org/2001/XML](http://www.w3.org/2001/XML)  
Schema-instance”\>  
SOAP-ENV:Header  
\<ns0:app\_id xmlns:ns0=“urn:fadfdf-systems:ws:http-param”\>

```
    <ns0:value>35</ns0:value>
  </ns0:app_id>
  <ns0:concept_id xmlns:ns0="urn:blahblahsystems:ws:http-param">

    <ns0:value>20</ns0:value>
  </ns0:concept_id>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
  <tns:list

```

xmlns:tns=“[http://blahblahblah.com/](http://blahblahblah.com/)”/\>

```
</SOAP-ENV:Body>

```

\</SOAP-ENV:Envelope\>

Here, i want to read values of app\_id and concept\_id by parsing the  
envelope.  
I want those values to be used by my wenservice method.  
How can I parse the SOAP envelope?
