ContributionsMost RecentMost LikesSolutionsRe: Value getting changed in datasource of 5.1.2Hi Team We are waiting for the resolution.Request you to please provide the resolution asap.Re: Value getting changed in datasource of 5.1.2Hi Team Please find the attached file for your reference.I am using excel and Open office both but its not working in 5.1.2 and NG pro and the same was working in 5.0.0.Please suggestRe: Value getting changed in datasource of 5.1.2Hi Team Please refer screen shot and the excel sheet for your reference.I have done the same thing in NG Pro but I am still getting the same error.In excel I have provided value ExpAgPLB=52.68 but in datasource its showing 52.6848 due to which assertion are getting failedRe: Value getting changed in datasource of 5.1.2Hi Team Still its not working and I have tried in NG Pro even in that its not working .Please provide the resolution asap.Re: [Res] How to use Count in jsonpathHi Jeshtha Thank you so much for the resolutionValue getting changed in datasource of 5.1.2Hi Team Currently I using SOAPUI version 5.1.2 .in this version I am getting a problem while reading the values from excel.On the same time when I am opening the project on 5.0.0 its showing correct values that I have given in excel.Please find the attached screen shot(value after decimal is getting changed)Re: [Res] How to use Count in jsonpathHi Marcus The solution provided by is not working its giving output -0 for the below response.Please find the attached screenshot Response: {"BlockRoomResult": { "TraceId": "e272f3dc-f362-4cfa-a863-0c15076ba6e7", "ResponseStatus": 1, "Error": { "ErrorCode": 0, "ErrorMessage": "" }, "IsPriceChanged": true, "IsCancellationPolicyChanged": false, "HotelRoomsDetails": [ { "RoomIndex": 1, "RoomTypeCode": "45000000022|1", "RoomTypeName": "Executive Room on Room basis", "RatePlanCode": "990000000014", "RatePlanName": "", "InfoSource": "FixedCombination", "SequenceNo": "IB~~1000000014~1", "DayRates": [ { "Amount": 2368.91, "Date": "2014-12-28T00:00:00" }, { "Amount": 2368.91, "Date": "2014-12-29T00:00:00" } ], "Price": { "CurrencyCode": "INR", "RoomPrice": 4737.82, "Tax": 923.25, "ExtraGuestCharge": 0, "ChildCharge": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 5661.07, "PublishedPriceRoundedOff": 5661, "OfferedPrice": 5661.07, "OfferedPriceRoundedOff": 5661, "AgentCommission": 0, "AgentMarkUp": 780.84, "ServiceTax": 48.8, "TDS": 0 }, "RoomPromotion": "", "Amenities": ["Accommodation"], "SmokingPreference": "NoPreference", "BedTypes": [], "Supplements": [], "SupplierSpecificData": null, "CancellationPolicies": [ { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-09-30T00:00:00", "ToDate": "2014-12-19T09:59:00" }, { "Charge": 1, "ChargeType": 3, "Currency": null, "FromDate": "2014-12-19T10:00:00", "ToDate": "2014-12-23T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-23T10:00:00", "ToDate": "2014-12-26T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-26T09:59:01", "ToDate": "2014-12-30T23:59:59" } ], "LastCancellationDate": "2014-09-29T00:00:00", "CancellationPolicy": "Executive Room on Room basis#^#100.00% of total amount will be charged, If cancelled between 30-Sep-2014 00:00:00 and 19-Dec-2014 09:59:00.| Charge of 1 night(s) will be charged, If cancelled between 19-Dec-2014 10:00:00 and 23-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 23-Dec-2014 10:00:00 and 26-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 26-Dec-2014 09:59:01 and 30-Dec-2014 23:59:59.|#!#" }, { "RoomIndex": 2, "RoomTypeCode": "45000000022|2", "RoomTypeName": "Executive Room on Room basis", "RatePlanCode": "990000000014", "RatePlanName": "", "InfoSource": "FixedCombination", "SequenceNo": "IB~~1000000014~1", "DayRates": [ { "Amount": 2368.91, "Date": "2014-12-28T00:00:00" }, { "Amount": 2368.91, "Date": "2014-12-29T00:00:00" } ], "Price": { "CurrencyCode": "INR", "RoomPrice": 4737.82, "Tax": 923.25, "ExtraGuestCharge": 0, "ChildCharge": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 5661.07, "PublishedPriceRoundedOff": 5661, "OfferedPrice": 5661.07, "OfferedPriceRoundedOff": 5661, "AgentCommission": 0, "AgentMarkUp": 780.84, "ServiceTax": 48.8, "TDS": 0 }, "RoomPromotion": "", "Amenities": ["Accommodation"], "SmokingPreference": "NoPreference", "BedTypes": [], "Supplements": [], "SupplierSpecificData": null, "CancellationPolicies": [ { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-09-30T00:00:00", "ToDate": "2014-12-19T09:59:00" }, { "Charge": 1, "ChargeType": 3, "Currency": null, "FromDate": "2014-12-19T10:00:00", "ToDate": "2014-12-23T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-23T10:00:00", "ToDate": "2014-12-26T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-26T09:59:01", "ToDate": "2014-12-30T23:59:59" } ], "LastCancellationDate": "2014-09-29T00:00:00", "CancellationPolicy": "Executive Room on Room basis#^#100.00% of total amount will be charged, If cancelled between 30-Sep-2014 00:00:00 and 19-Dec-2014 09:59:00.| Charge of 1 night(s) will be charged, If cancelled between 19-Dec-2014 10:00:00 and 23-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 23-Dec-2014 10:00:00 and 26-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 26-Dec-2014 09:59:01 and 30-Dec-2014 23:59:59.|#!#" }, { "RoomIndex": 3, "RoomTypeCode": "45000000022|3", "RoomTypeName": "Executive Room on Room basis", "RatePlanCode": "990000000014", "RatePlanName": "", "InfoSource": "FixedCombination", "SequenceNo": "IB~~1000000014~1", "DayRates": [ { "Amount": 2368.91, "Date": "2014-12-28T00:00:00" }, { "Amount": 2368.91, "Date": "2014-12-29T00:00:00" } ], "Price": { "CurrencyCode": "INR", "RoomPrice": 4737.82, "Tax": 923.25, "ExtraGuestCharge": 0, "ChildCharge": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 5661.07, "PublishedPriceRoundedOff": 5661, "OfferedPrice": 5661.07, "OfferedPriceRoundedOff": 5661, "AgentCommission": 0, "AgentMarkUp": 780.84, "ServiceTax": 48.8, "TDS": 0 }, "RoomPromotion": "", "Amenities": ["Accommodation"], "SmokingPreference": "NoPreference", "BedTypes": [], "Supplements": [], "SupplierSpecificData": null, "CancellationPolicies": [ { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-09-30T00:00:00", "ToDate": "2014-12-19T09:59:00" }, { "Charge": 1, "ChargeType": 3, "Currency": null, "FromDate": "2014-12-19T10:00:00", "ToDate": "2014-12-23T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-23T10:00:00", "ToDate": "2014-12-26T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-26T09:59:01", "ToDate": "2014-12-30T23:59:59" } ], "LastCancellationDate": "2014-09-29T00:00:00", "CancellationPolicy": "Executive Room on Room basis#^#100.00% of total amount will be charged, If cancelled between 30-Sep-2014 00:00:00 and 19-Dec-2014 09:59:00.| Charge of 1 night(s) will be charged, If cancelled between 19-Dec-2014 10:00:00 and 23-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 23-Dec-2014 10:00:00 and 26-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 26-Dec-2014 09:59:01 and 30-Dec-2014 23:59:59.|#!#" }, { "RoomIndex": 4, "RoomTypeCode": "45000000022|4", "RoomTypeName": "Executive Room on Room basis", "RatePlanCode": "990000000014", "RatePlanName": "", "InfoSource": "FixedCombination", "SequenceNo": "IB~~1000000014~1", "DayRates": [ { "Amount": 2368.91, "Date": "2014-12-28T00:00:00" }, { "Amount": 2368.91, "Date": "2014-12-29T00:00:00" } ], "Price": { "CurrencyCode": "INR", "RoomPrice": 4737.82, "Tax": 923.25, "ExtraGuestCharge": 0, "ChildCharge": 0, "OtherCharges": 0, "Discount": 0, "PublishedPrice": 5661.07, "PublishedPriceRoundedOff": 5661, "OfferedPrice": 5661.07, "OfferedPriceRoundedOff": 5661, "AgentCommission": 0, "AgentMarkUp": 780.84, "ServiceTax": 48.8, "TDS": 0 }, "RoomPromotion": "", "Amenities": ["Accommodation"], "SmokingPreference": "NoPreference", "BedTypes": [], "Supplements": [], "SupplierSpecificData": null, "CancellationPolicies": [ { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-09-30T00:00:00", "ToDate": "2014-12-19T09:59:00" }, { "Charge": 1, "ChargeType": 3, "Currency": null, "FromDate": "2014-12-19T10:00:00", "ToDate": "2014-12-23T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-23T10:00:00", "ToDate": "2014-12-26T09:59:00" }, { "Charge": 100, "ChargeType": 2, "Currency": null, "FromDate": "2014-12-26T09:59:01", "ToDate": "2014-12-30T23:59:59" } ], "LastCancellationDate": "2014-09-29T00:00:00", "CancellationPolicy": "Executive Room on Room basis#^#100.00% of total amount will be charged, If cancelled between 30-Sep-2014 00:00:00 and 19-Dec-2014 09:59:00.| Charge of 1 night(s) will be charged, If cancelled between 19-Dec-2014 10:00:00 and 23-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 23-Dec-2014 10:00:00 and 26-Dec-2014 09:59:00.|100.00% of total amount will be charged, If cancelled between 26-Dec-2014 09:59:01 and 30-Dec-2014 23:59:59.|#!#" } ] }}Re: [Res] How to use Count in jsonpathHi Marcus Below is the JSON request and response and I am using version 5.1.2. and the resolution provided by you for counting cancellation policy "def Cancellationpolicy = context.expand( '${BlockRoomFixedBE#ResponseAsXml#count(//*:BlockRoomResult/*:HotelRoomsDetails[0]/*:CancellationPolicies)}' )" is not working it is giving me count 0 and on the same time I am using count assertion its giving me count 8.Please refer the screen shot for the same and important thing is I dont want to use assertions,I am using groovy scripting and I want to use count there ,like I was using count in Xpath "def CancellationPolicies = context.expand( '${BE RoomDetails#ResponseAsXml#declare namespace ns1=\'http://iapi.tbotechnology.in/searchrequest/\'; count(//ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e['+m+']/ns1:CancellationPolicies[1]/ns1:e)}' )" Please provide the solution that why Json that I am providing is not getting converted into xml and how to apply count in JSON using Grrovy scripting JSON Request: { "AgencyId": 8428, "ResultIndex": 1, "HotelCode": "${BE Request#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:HotelSearchResult[1]/ns1:HotelResults[1]/ns1:e[1]/ns1:HotelCode[1]}", "HotelName": "${BE Request#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:HotelSearchResult[1]/ns1:HotelResults[1]/ns1:e[1]/ns1:HotelName[1]}", "GuestNationality": "IN", "NoOfRooms": 4, "ClientReferenceNo": 0, "HotelRoomsDetails": [ { "RoomIndex": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:RoomCombinations[1]/ns1:RoomCombination[1]/ns1:e[3]/ns1:RoomIndex[1]/ns1:e[1]}", "RoomTypeCode": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:RoomTypeCode[1]}", "RoomTypeName": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:RoomTypeName[1]}", "RatePlanCode": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:RatePlanCode[1]}", "BedTypeCode": null, "SmokingPreference": 0, "Supplements": null, "Price": { "RoomPrice": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:RoomPrice[1]}", "Tax": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:Tax[1]}", "ExtraGuestCharge": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:ExtraGuestCharge[1]}", "ChildCharge": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:ChildCharge[1]}", "OtherCharges": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:OtherCharges[1]}", "Discount": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:Discount[1]}", "PublishedPrice": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:PublishedPrice[1]}", "PublishedPriceRoundedOff": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:OfferedPriceRoundedOff[1]}", "OfferedPrice": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:OfferedPrice[1]}", "OfferedPriceRoundedOff": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:OfferedPriceRoundedOff[1]}", "AgentCommission": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:AgentCommission[1]}", "AgentMarkUp": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:AgentMarkUp[1]}", "ServiceTax": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:ServiceTax[1]}", "TDS": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[3]/ns1:Price[1]/ns1:TDS[1]}" }, "HotelPassenger": [ { "Title": "mr", "Firstname": "Rohit", "Middlename": null, "Lastname": "Bisariya", "Phoneno": null, "Email": null, "PaxType": 1, "LeadPassenger": true, "Age": 0, "PassportNo": null, "PassportIssueDate": null, "PassportExpDate": null }, { "Title": "mr", "Firstname": "Rohit", "Middlename": "two", "Lastname": "Bisariya", "Phoneno": null, "Email": null, "PaxType": 2, "LeadPassenger": false, "Age": 12, "PassportNo": null, "PassportIssueDate": null, "PassportExpDate": null }, { "Title": "mr", "Firstname": "Rohit", "Middlename": "two", "Lastname": "Bisariya", "Phoneno": null, "Email": null, "PaxType": 2, "LeadPassenger": false, "Age": 16, "PassportNo": null, "PassportIssueDate": null, "PassportExpDate": null } ] }, { "RoomIndex": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:RoomCombinations[1]/ns1:RoomCombination[1]/ns1:e[4]/ns1:RoomIndex[1]/ns1:e[1]}", "RoomTypeCode": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:RoomTypeCode[1]}", "RoomTypeName": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:RoomTypeName[1]}", "RatePlanCode": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:RatePlanCode[1]}", "BedTypeCode": null, "SmokingPreference": 0, "Supplements": null, "Price": { "RoomPrice": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:RoomPrice[1]}", "Tax": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:Tax[1]}", "ExtraGuestCharge": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:ExtraGuestCharge[1]}", "ChildCharge": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:ChildCharge[1]}", "OtherCharges": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:OtherCharges[1]}", "Discount": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:Discount[1]}", "PublishedPrice": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:PublishedPrice[1]}", "PublishedPriceRoundedOff": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:OfferedPriceRoundedOff[1]}", "OfferedPrice": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:OfferedPrice[1]}", "OfferedPriceRoundedOff": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:OfferedPriceRoundedOff[1]}", "AgentCommission": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:AgentCommission[1]}", "AgentMarkUp": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:AgentMarkUp[1]}", "ServiceTax": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:ServiceTax[1]}", "TDS": "${BE RoomDetails#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:GetHotelRoomResult[1]/ns1:HotelRoomsDetails[1]/ns1:e[4]/ns1:Price[1]/ns1:TDS[1]}" }, "HotelPassenger": [ { "Title": "mr", "Firstname": "Rohit", "Middlename": null, "Lastname": "Bisariya", "Phoneno": null, "Email": null, "PaxType": 1, "LeadPassenger": true, "Age": 0, "PassportNo": null, "PassportIssueDate": null, "PassportExpDate": null } ] } ], "EndUserIp": "123.1.1.1", "TokenId": "${LOGIN (Authenticate)#Response#declare namespace a='SharedServices'; declare namespace ns1='http://tempuri.org/'; //ns1:AuthenticateResponse[1]/ns1:AuthenticateResult[1]/a:TokenId[1]}", "ClientId": "nishant", "TokenAgencyId": 8428, "TokenMemberId": 9611, "TraceId": "${BE Request#ResponseAsXml#declare namespace ns1='http://iapi.tbotechnology.in/searchrequest/'; //ns1:Response[1]/ns1:HotelSearchResult[1]/ns1:TraceId[1]}" } JSON Response {"GetBookingResult": { "TraceId": "", "ResponseStatus": 2, "Error": { "ErrorCode": 2, "ErrorMessage": "Object reference not set to an instance of an object." }, "BookingRefNo": null, "ConfirmationNo": null, "Status": 0 }}Re: [Res] How to use Count in jsonpathHi Team In JSon response I am getting </xml> and using responseAsxml, json not getting converted into xml and in Json count is not working .In the above reply given JSON count for cancelaltionpolicy is not working.Please suggest I am getting the error in logs when JSon response is not getting converted.It would be better if you provide solution for the error that 'why json is not getting converted into xml' that would be helpful for me Please find the attachment for the error[Res] How to use Count in jsonpathHi Team In Xpath I am using 'count' to count the nodes like in the below example I am counting number of HotelStay.Please tell me how to count the same in jsonpath.I want to count the CancellationPolicies given below Xpath: def UAPIResultCount = context.expand( '${#TestCase#UAPIXML#declare namespace ns1=\'UniversalAirAPI\';count(//OTA_HotelAvailRS[1]/HotelStays[1]/HotelStay)}' ) Json path: def Cancellationpolicy = context.expand( '${BlockRoomFixedBE#Response#$.BlockRoomResult.HotelRoomsDetails[0].CancellationPolicies[1]}' )