ChrisG29
ChrisG29

Reputation: 1571

SoapUI not reading project property

I'm trying to use a project property to make up part of a JWT token that I'm passing through for my request.

The project property is: Name = AuthToken, Value = 12345.

The following works in the header:

Header = Authorization, Value = JWT 12345

But when I try to use property expanison: Value = JWT ${AuthToken}

I get an error saying:

{
   "statusCode": "InternalServerError",
   "message": "An unknown error has occured. Please try again later.",
   "reason": "Internal Server Error"
}

Is there something wrong with the syntax? I've tried a couple of variations based on what I read in the user guides, but it doesn't seem to be working.

Upvotes: 0

Views: 631

Answers (1)

albciff
albciff

Reputation: 18517

The syntax to access a project property using property expansion is ${#Project#YourPropertyName}.

So as header value use JWT ${#Project#AuthToken} instead of JWT ${AuthToken}

Hope it helps,

Upvotes: 1

Related Questions