Topic
  • 6 replies
  • Latest Post - ‏2012-05-01T02:10:57Z by subbu_47
subbu_47
subbu_47
19 Posts

Pinned topic Unable to grab the Http Header values using dp variable in XI 52 box

‏2012-04-27T15:56:36Z |
Hi,

Iam setting up a value for http request header in XS 40 box and connecting to XI 52 box. but when I see the XI 52 logs/Probe, I dont see the value populated under Header section. (but I can see the value populated in XS 40 box Header section with name "DPToken")

Code on XS 40 box before sending the request to XI 52box.
<!-- Inserts DPToken header field and its associated value into the HTTP header of a client request. -->
<dp:set-http-request-header name="'DPToken'" value="$SecurityToken"/>
Code return on XI 52 to pull the value present in HttpHeader

<!-- Grab the DPToken from the HTTP header -->
<xsl:variable name="SecurityToken" select="dp:http-request-header('DPToken')"/>

But, I am getting this "SecurityToken" value as NULL. Now I doubt if this dp:http-request-header works good in XI 52 box's?
Thanks,
Subbu
Updated on 2012-05-01T02:10:57Z at 2012-05-01T02:10:57Z by subbu_47
  • HermannSW
    HermannSW
    6659 Posts

    Re: Unable to grab the Http Header values using dp variable in XI 52 box

    ‏2012-04-27T16:21:13Z  
    The easiest way to investigate this is:
    • take a packet capture on either box
    • send one request through

    • stop packet capture
    • open packet capture in Wireshark
    • filter for 'tcp.port=abcd' where abcd is your service's port
    • do 'Follow TCP stream'
    • check whether header gets send or not

    Hermann<myXsltBlog/> <myXsltTweets/>
  • subbu_47
    subbu_47
    19 Posts

    Re: Unable to grab the Http Header values using dp variable in XI 52 box

    ‏2012-04-28T16:30:33Z  
    • HermannSW
    • ‏2012-04-27T16:21:13Z
    The easiest way to investigate this is:
    • take a packet capture on either box
    • send one request through

    • stop packet capture
    • open packet capture in Wireshark
    • filter for 'tcp.port=abcd' where abcd is your service's port
    • do 'Follow TCP stream'
    • check whether header gets send or not

    Hermann<myXsltBlog/> <myXsltTweets/>
    Hi Hermann,

    Thanks for your reply, I tried to get the packet capture in XS 40 box, but when I try to open the packet capture in wireshark, I am not able to read the data in TCP follow stream, It is not in a readable format even though I selected it as ASCII.

    Attached the packet capture for your reference, and I am sending the request from 8089 port(ip address ends with .153) to 444 port(ip address ends with .126).

    Pls let me know if anything wrong I did with my packet capture.
  • HermannSW
    HermannSW
    6659 Posts

    Re: Unable to grab the Http Header values using dp variable in XI 52 box

    ‏2012-04-29T03:14:08Z  
    • subbu_47
    • ‏2012-04-28T16:30:33Z
    Hi Hermann,

    Thanks for your reply, I tried to get the packet capture in XS 40 box, but when I try to open the packet capture in wireshark, I am not able to read the data in TCP follow stream, It is not in a readable format even though I selected it as ASCII.

    Attached the packet capture for your reference, and I am sending the request from 8089 port(ip address ends with .153) to 444 port(ip address ends with .126).

    Pls let me know if anything wrong I did with my packet capture.
    Hi,

    please enter "tcp.port==8089" in "Filter:" field of Wireshark and then press enter.
    That selects only those packets releated to port 8089.

    Right click on any of the (few) packets selected and do "Follow TCP Stream".
    This opens a window with your POST and the HTTP response.
    The error in "/*/*/*/detail" of the response seems to indicate a problem in your setup (cannot read .dpa).

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • subbu_47
    subbu_47
    19 Posts

    Re: Unable to grab the Http Header values using dp variable in XI 52 box

    ‏2012-04-30T20:51:55Z  
    • HermannSW
    • ‏2012-04-29T03:14:08Z
    Hi,

    please enter "tcp.port==8089" in "Filter:" field of Wireshark and then press enter.
    That selects only those packets releated to port 8089.

    Right click on any of the (few) packets selected and do "Follow TCP Stream".
    This opens a window with your POST and the HTTP response.
    The error in "/*/*/*/detail" of the response seems to indicate a problem in your setup (cannot read .dpa).

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    Hi Harmann,

    Thanks alot for your detail explanation, now I have cleared the errors on the dpa part, but now also, I am not getting the value of Header field in my CapturePacket.

    But I can see that value in my probe at last mirror(attached probe screen shot for your reference).

    But in wireShark, I can only these below values but not my "DpToken" which I set up in my httpHeader using xslcode.
    ============================ wireShark TcpFollowStream at tcp.port == 8089
    ==============
    POST /BenefitsService/1.0/GetEOCSummary HTTP/1.1
    Content-Type: text/xml
    SOAPAction: "urn:BenefitsService"
    User-Agent: Jakarta Commons-HttpClient/3.1
    Host: 127.0.0.1:8089
    Via: 1.1 AAAAAH0KAAA-,1.1 AAAAAIMKAAA-
    X-Client-IP: 30.138.17.24,127.0.0.1
    X-Archived-Client-IP: 30.138.17.24
    Connection: Keep-Alive
    Content-Length: 3320
    ===================================

    Pls let me know if anything is any other ways to findout.
  • HermannSW
    HermannSW
    6659 Posts

    Re: Unable to grab the Http Header values using dp variable in XI 52 box

    ‏2012-04-30T23:02:12Z  
    • subbu_47
    • ‏2012-04-30T20:51:55Z
    Hi Harmann,

    Thanks alot for your detail explanation, now I have cleared the errors on the dpa part, but now also, I am not getting the value of Header field in my CapturePacket.

    But I can see that value in my probe at last mirror(attached probe screen shot for your reference).

    But in wireShark, I can only these below values but not my "DpToken" which I set up in my httpHeader using xslcode.
    ============================ wireShark TcpFollowStream at tcp.port == 8089
    ==============
    POST /BenefitsService/1.0/GetEOCSummary HTTP/1.1
    Content-Type: text/xml
    SOAPAction: "urn:BenefitsService"
    User-Agent: Jakarta Commons-HttpClient/3.1
    Host: 127.0.0.1:8089
    Via: 1.1 AAAAAH0KAAA-,1.1 AAAAAIMKAAA-
    X-Client-IP: 30.138.17.24,127.0.0.1
    X-Archived-Client-IP: 30.138.17.24
    Connection: Keep-Alive
    Content-Length: 3320
    ===================================

    Pls let me know if anything is any other ways to findout.
    Hi,

    that is good news in that you now have proven two things:
    • DPToken header is set in last context before result action
    • DPToken header is not set in request posted

    Please create a PMR to narrow down the issue, and identify whether this is a bug or configuration issue.
    Level2 support will collect the required data from you needed for investigation (config, requests, ...).

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • subbu_47
    subbu_47
    19 Posts

    Re: Unable to grab the Http Header values using dp variable in XI 52 box

    ‏2012-05-01T02:10:57Z  
    • HermannSW
    • ‏2012-04-30T23:02:12Z
    Hi,

    that is good news in that you now have proven two things:
    • DPToken header is set in last context before result action
    • DPToken header is not set in request posted

    Please create a PMR to narrow down the issue, and identify whether this is a bug or configuration issue.
    Level2 support will collect the required data from you needed for investigation (config, requests, ...).

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    Hi Hermann,

    Thank you for your advice, I will raise a PMR tommorow with IBM and update you once I get the status.

    Thanks for your help.