Forum Discussion

ankursies's avatar
ankursies
New Contributor
9 years ago

Transferring SAML value from a SOAP Response to another SOAP Request HTTP Header section

Below mentioned are the Steps I want to follow to achieve my result, but I dont know how to do it?

1) Generate SAML Token from a SOAP Request - I am able to do this.

2) The SAML Token generated in the Tag "Return" has a Value which I want to pass to a HTTP Header defined by the User. - Unable to achieve this.

 

Attached is the screenshot for your reference.

 

Can anyone help me as how this can be achieved?

 

2 Replies

  • You can achieve this without any scripting

    1. Add a Property Transfer Test step and transfer the value inside <return> tags to Test Case Property

    2. Specify the value of you header as ${#TestCases#httpHeader}

     

       Above I made the assumption that the name of your test case property is 'httpHeader' otherwise rename accordingly. As far as your test case executes steps in below order you header should get correct value

    1. Run the service which returns the SAML value you need

    2. Then Property transfer to transfer value from SOAP response to Test Case Property

    3. Then the step where you need to use the custom header which is read from test case property

     

    Cheers!

     

    Gilu Gopi

    • ankursies's avatar
      ankursies
      New Contributor

      Thanks for your reply.

       

      However, I am still facing issue in doing the property transfer. Here are the steps I am following:

       

      1) Run my SAML Token Request and got the Response successfully. Also noted the Tag "Return" whose value I want to Pass using property Transfer.

      2) Added Property Transfer

      Question: How to transfer the value inside <return> tags to Test Case Property.

      3) Added a Header with the value ${#TestCases#httpHeader}

      Question: How to read the custom header which is read from test case property.

       

      I would really appreciate if you can provide me detailed response.