Forum Discussion
That is weird. Id expect a 404 if the resource wasnt found.....Ive only ever seen a 405 generated when the illegal method was used against the endpoint, i.e. a DELETE method was used against an endpoint that doesnt support a DELETE method.
Did you definitely get a 405 rather than a 404?
This is unlikely, but have you double checked you havent picked up the wrong request when you created that particular test step?
As i say above, if you were getting a 404 that would occur if your transfer wasmt getting the correct id via the prop xfer from the POST to the GET. Are you sure you arent grabbing thr value along with an invisible space character in the prop xfer? This would result in the GET not being successful.
As ChrisAdams suggests you need to check the logging (via the RAW details) on both the POST and the GET, but that wont help for logging on non-executable steps (like a prop xfer).
Have a look in the ReadyAPI log.....this should indicate exactly what value is being picked up.
Are you xferring the value using a prop xfer step along with a properties step? Or are you transferring without a prop xfer step? Or are you xferring with just a prop xfer step?
Youve got an interesting issue to sort out!
Cheers!
Rich
richie : Thanks for your reply. Again I will try to explain. it seems that when I try to take the ID(property) from post method then only I am getting the error if I am just passing the ID directly hardcoded I am not getting the error.
Let me write my workflow
step1: I called my POST method with some data to upload that return successfully with no error.
Step2: I tried to GET that data based on the unique Id which is generated by the POST method as suggested by you I used the value POST response Id in GET method.
Error in the step: Swagger Compliance Assertion -> No resource that matches the OpenAPI definition.
Same with the DELETE as I explained in previous comments I am getting 405 when choosing the ID from response of post otherwise if we are passing the ID directly we are not getting 405.
I am also attaching screenshots so that you have a better understanding.
Regards
Asad
- AsadGilani4 years agoOccasional Contributor
No updates on my previous reply yet. If someone has any idea please reply.
- ChrisAdams4 years agoChampion Level 3
Hi,
If it works when you 'hard-code' the id but does not when you 'pull' the value in from a different step, then I can only think something about the second way is wrong.
richie mentioned that the error number looked odd, e.g. you usually expect a 500 if you pass in an invalid value/payload. The error is actually a Swagger error. Now, I have haven't used Swagger beyond creating an account, but it's Swagger saying "No resource that matches the OpenAPI definition". In other words, it looks like your request is malformed, incorrect, or calling the wrong method etc. when you pull the value in.
Did you try what I suggested above? SoapUI request steps have a 'raw' tab which shows exactly what SoapUI sent to the API. Compare what is in the raw tab after sending hard-coded value against what is in the raw tab when you automate.
- AsadGilani4 years agoOccasional Contributor
ChrisAdams: Thanks for your time. Yes, I looked into the raw request. You were right the value in the URL is not passing correctly but the question is why it is not passing correctly?
I am attaching the raw request with hardcoded and with the selecting property both.
So, now our aim is why it is not sending the correct values when we are selecting from the post method.
Related Content
- 6 years ago