Contributions
Re: How to use value from jdbc response into the json payload for a web service in soap ui free version
Sir, actually, lately i noticed that "Post QueryString" was tick marked by default. When i unticked it, payload accepted value from properties. -----(RESOLVED) please consider my another request which we were discussing earlier...to transfer id's I get from jdbc into json payload automatically. how to make it happen? Thanks in advance2.2KViews0likes2CommentsRe: How to use value from jdbc response into the json payload for a web service in soap ui free version
scene 1:-Here is the SS attached.for my rough prctical work, This is how i am passing the value in payload and getting error. Please suggest what i am doing wrong. For project work, you can help me with this "to call 3 json requests with each id ". Thanks in advance!2.2KViews0likes8CommentsRe: How to use value from jdbc response into the json payload for a web service in soap ui free version
data in my database keeps changing. I apply same query, sometimes, result for id 1,2 and 3 comes and other times, value for id 5 comes.(i hope, i made you clear my data is dynamic) pretty please, the way to use this value and transfer in payload. Because i am a newbie, i manually set property value to lets say 15.(considering it as static for time being) and i was trying to pass it in payload using the syntax :--"id": "${#TestCase#ID}" I am getting error message{"message": "Could not parse request body into json: Unrecognized token 'identity': was expecting ('true', 'false' or 'null')\n at [Source: (byte[])\"identity=2\"; line: 1, column: 10]"}....WHY SO?? please gimme answer considering both scenarios..if possible, provide grrovy script for the same. Your contribution will mean a lot to me. Thanks2.9KViews0likes10CommentsRe: How to use value from jdbc response into the json payload for a web service in soap ui free version
nmraosir scenario 1:-- no, the values are not static. the value of 'id' can go on changing as per the requirement, so Only after applying certain conditions in sql query, i am coming upon the jdbc response(as mentioned earlier). i want dynamic approach to pass data in json payload scenario2:--"id": "${#TestCase#ID}" approach is static, also, i applied this for learning purpose. I am getting error: "{"message": "Could not parse request body into json: Unrecognized token 'id': was expecting ('true', 'false' or 'null')\n at [Source: (byte[])\"id=2\"; line: 1, column: 10]"}"2.9KViews0likes12CommentsRe: How to compare only selected nodes xml data of jdbc response with my json response
nmraosir, here is the sample data:-- response from jdbc :-----<Results><ResultSet fetchSize="0"><Row rowNumber="1"><CAT.ID>2</CAT.ID><CAT.ROLL_NO>100</CAT.ROLL_NO><CAT.NAME>Enid</CAT.NAME><CAT.PASSWORD>12345</CAT.PASSWORD><CAT.STATUS>1</CAT.STATUS></Row><Row rowNumber="2"><CAT.ID>9</CAT.ID><CAT.ROLL_NO>101</CAT.ROLL_NO><CAT.NAME>Alisha</CAT.NAME><CAT.PASSWORD>67891</CAT.PASSWORD><CAT.STATUS>1</CAT.STATUS></Row><Row rowNumber="3"><CAT.ID>15</CAT.ID><CAT.ROLL_NO>102</CAT.ROLL_NO><CAT.NAME>Dave</CAT.NAME><CAT.PASSWORD>45637</CAT.PASSWORD><CAT.STATUS>1</CAT.STATUS></Row></ResultSet></Results> and json response of a web service is:-- { "customer": [ { "last_name": "jayswal", "roll_num": "100", "password": "85658", "first_name": "Enid", "email": "dk@gmail.com" }, { "last_name": "jayswal", "photo": "105", "roll_num": "85658", "first_name": "shalin", "email": "dk@gmail.com" } ] } Now i want to compare roll no. =100 is equal to any roll no. from the json response Also, i am very new in automation. So, please enlighten me in detail regarding this query i posted. I shall be grateful to you. Thanks.1.1KViews0likes1CommentRe: How to use value from jdbc response into the json payload for a web service in soap ui free version
nmraosir, here is the sample data my resonse from jdbc sql query in xml is :-- <Results> <ResultSet fetchSize="0"> <Row rowNumber="1"> <CAT.ID>2</CAT.ID> </Row> <Row rowNumber="2"> <CAT.ID>9</CAT.ID> </Row> <Row rowNumber="3"> <CAT.ID>15</CAT.ID> </Row> </ResultSet> </Results> and now i want to use cat.id whose value is 15 in my new json payload having syntax :-- { "id": "__" } In this id, i want to fetch 15 from the above Thanks in advance2.9KViews0likes16CommentsHow to compare only selected nodes xml data of jdbc response with my json response
Hi guys, I am new in automation and soap ui open source. In one test step, I am getting json response. and in another test step, I am getting xml response.(by using jdbc sql) Now, I want to compare some of the values of my json response with that of xml response. How should I do it. lets say, my json response contains id, roll no., name, password, address. and in xml(response from running query), i have reg_no, name Now i want to match roll no and reg_no. Please suggest me how to do it. If can be done through groovy script, then please how? Thanks in advanceSolved1.1KViews0likes3Comments