Contributions
Re: Property Transfer using JSONPath in 5.1.2
Hi, just to follow up on my previous post and statewhat I'm are trying to achieve; I have a REST web service method that returns a JSON response. I would like to extact a value from the body of the repsonse and pass it to another REST web service method that takes the value in the URL. How would I do this in SoapUI 5.1.2? Simplified Example (not related to the screen shots in the previous post) ------------------------ First web service method; GET /customers {"customers": [ { "firstName": "John", "lastName": "Smith", "customerId": "12345" } ]} >> extract customerId from JSON response, then >>>> second web service method with customerId GET /customer/1234513KViews0likes1CommentRe: Property Transfer using JSONPath in 5.1.2
Hi, sure, I'm using SoapUI 5.1.2 and have a REST GET request (REQUEST1) that returns JSON which I have validated using jsonlint.com. In a testsuite I create a new testcase with 2 test requests and a Property Transfer. In the property transfer I set the source and target to the two testcase requests. In the source, I set the property to 'Response' and the path language to 'JSONPath'. In the target I set the property to Request and the path language to JSONPath. Now, Im usinghttp://goessner.net/articles/JsonPath/ for the syntax for JSONPath and have $.* in my source expression, which I think should be everthing in the response. Now, when I run the property transfer I get "[Invalid JSON: { .... " in the transferred values. Now, I'm assuming I have the syntax in the source expression wrong but I'm not sure. Interestingly, and I'm not sure if this is important or not, the JSON shown in the JSON tab is 'not the same' as in the Raw tab (the "class" object is missing)...13KViews0likes2CommentsProperty Transfer using JSONPath in 5.1.2
Hi, Is there some guidance on using the JSONPath path language in Property Transfers with version 5.1.2? It's great that we can now use this feature for testing our JSON based services but I'm a bit stuck trying to figure out the correct syntax. Google has not been my friend in this case... Thanks in advance fort any help...13KViews0likes4Comments