Contributions
- 930Views0likes0Comments
Variable assertions?
I have a rest service that returns inventory status for products. The inventory status is determined by the code in the software and is not stored in the database and works of the following rules if availableQuantity >=1 show "Available" Or if availableQuantity =0 show "Unavailable". for reference this is a sample of the JSON response; { "InventoryAvailability": [ { "availableQuantity": "0.0", "inventoryStatus": "Unavailable", "onlineStoreId": "10151", "onlineStoreName": "Store", "productId": "259008", "unitOfMeasure": "C62" }, { "availableQuantity": "914.0", "inventoryStatus": "Available", "onlineStoreId": "10151", "onlineStoreName": "Store", "productId": "259010", "unitOfMeasure": "C62" } The issue that i am having is being able to assert for the "inventoryStatus" value based on the "availableQuantity" value using the above rule. Any help would be fantastic Many Thanks Tim (SoapUI Pro 5.1.2)1.2KViews0likes3CommentsRe: Transferring response parameters into the header
Hi PaulM, Thanks for the reply! To try and be a little clearer these are the steps 1 - Login service is sent to log the customer in 2 - successful login returns a response with the following in the JSON; "WCToken": "16073%2cJxYrqS1bdrjPgOFaDQCXin4HwFTi85hzeTTuhIMsqjhqofQQfqwvh1UwqbvA2q24QeGsOaOjy2sjnixquLc%2bhi%2bmGQ180Hc8Z%2fD3kLx5kI5x8yxmXCPFUNQ6PTAPL%2bAtyIRJ47hU%2bg6omWaAHxXcnrHKM32J25hoMmpK%2b5sJ5ocwIY49LW70%2bDirB%2bCmtAQIZRCfuHK2n9YiA0FKmP1VDA%3d%3d", "WCTrustedToken": "16073%2c5RMrBkCP7FZUOyDkvj0aj8PIQdI%3d", 3 - All of the following services require the above 2 'attributes' with their values to be sent in the header rather than the body of the message. The bit that i am stuggling with is how to set up the subsequent services to use the 2 header values from the initial response. Hope that helps! Tim855Views0likes0CommentsTransferring response parameters into the header
Hi, I am new to SoapUI Pro. My current Project is using a large amount of REST services to talk between the front end and the back end of the website. We have no access to the front end and are only developing the back end. I have a scenario where a customer logs in which triggers the log in service. The response from this service has 4 Tokens for use in further service headers to identify the customer. What i am struggling to do is transfer these tokens automatically from the response of the first service into the header of the following services. Can anyone help? Thanks Tim1.2KViews0likes2Comments