1 Reply Latest reply on Mar 6, 2013 1:38 AM by Nicklas Karlsson

    Reading Soap Header using JBoss

    serge sert Newbie

      I need to read this xml header. Am interested in reading the session_id inside the header

       

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://services.com/" xmlns:ns2="http://tech.com/">
      <SOAP-ENV:Header>
         
      <ns2:header id="ref1">
             
      <session_id>63949bc1878725afd28cc8283ec3252a</session_id>
             
      <ip_address>127.0.0.1</ip_address>
             
      <user_agent>Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0</user_agent>
             
      <last_activity>1362395880</last_activity>
             
      <user_data></user_data>
             
      <username>serge</username>
             
      <logged_in>true</logged_in>
         
      </ns2:header>
         
      <ns2:header href="#ref1"/>
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>
         
      <ns1:getInvo>
             
      <id>1</id>
         
      </ns1:getInvo>
      </SOAP-ENV:Body>

      </SOAP-ENV:Envelope>

       

      Below is the web service method that I have

       

       

      @WebMethod

          public XmlLogin checkUserCred(@WebParam(name = "USER") String USERALIAS,

                  @WebParam(name = "PASS") String PASSWORD,

                  @WebParam(name="Txheader",mode=Mode.OUT, header=true) Holder<TxHeader> txHeader.

                  @WebParam(name="header",mode=Mode.IN, header=true) Object inHeader //note this is not working

                   )

          {
           //method Code goes here

          }