I am leaning API Gateway. I followed the 40AGW2001 training lab PDF for SOAP API assertions example. I create it as the lab said in API gateway. This is my final policy, like the lab showed on page 43:
However, not sure why still get Warnings? When I am testing the API in SOAPUI, as long as I have some data in the HTTP header for authentication (for example, a non-existing user name "tjohkjk" in my testing), I can get the good result back. This is the log.
I think it is the logic issue in the assertions, but not sure what is the correct configuration. Anyone can help me on this?
The audit on line 14 should belong to the all assertions folder on line 12. Drag it into that folder and it should fix the warning in the Policy Validation section.
Thank you, that does fix the warning, but why I always get the good response back as long as I gave some dummy authentication data?
Add audit detail assertions always return true. You had it as a direct child of an at least one assertion folder. No Matter what authentication you provided it was always true because the last assertion is always true fulfilling the requirement of line 5.
After the warning is fixed, the API works as designed. So there cannot have any compilation warnings in policy, otherwise, the policy will not work as designed.