Forum Discussion

ehase's avatar
ehase
New Contributor
17 years ago

HTTP header using property value

Hi there,

Just a quick note, I've been using soapUI for 2 days now... so I apologize if this is covered in the documentation and I just didn't understand it.

I am trying to pass a custom header value in the form of a property.  I've read this post: http://www.eviware.com/forums/index.php?topic=948.0

which appears to be what I want.  However my implementation appears off/wrong. 

At it's most basic, this is what I am doing...

1. create a property step which defines a property "Token" (not quotes).  This step just sets the property to nothing (using it as a container for a future step).  It appears I need this for step 3.
2. make a SOAP call to get the value for Token
3. use Property Transfer to set Token from step 1, to the response value in step 2
4. make a new SOAP call which sets a customer header value to Token from step 3.

Hopefully that makes sense.  My test is successful up to step 3.  The calls are made and the Property Transfer is set.  However I cannot seems to get the proper reference in the header for step 4; the value of Token isn't passed.

I'm using this exact value for the header: ${#TestCase#Token}

I've also just tried using ${Token}

What have I done wrong here?  Is my reference to the property incorrect?

thanks...

ehase

1 Reply

  • ehase's avatar
    ehase
    New Contributor
    I found my mistake.  This works as intended.  The error was between the keyboard and the chair.

    I transposed two letters in my token name (I was attempting to simplify naming convention to make sure I didn't have a typo... which I did).

    all is well and the header information is passed without issue.

    thanks,
    ehase