data source query
Hi Team,
I have a scnerio where I need to fetch request data from data source and sink the response data in source file.my data is as below.so for below 4 fields we have differenct scnerios in a excel sheet and i tried to feetch excel sheet data into request like-${DataSource#LifeCycle},${DataSource#LifeStage},${DataSource#Loyalty_ID},${DataSource#PLCC_ID} in request.
below are the fields:-
LifeCycle:1
LifeStage:2
LoyaltyIndicator:true
PLCCIndicator:false
when i send this request I got 1 error as-
"Error 500: javax.servlet.ServletException: org.codehaus.jackson.map.JsonMappingException: Can not construct instance of boolean from String value '': only "true" or "false" recognized
at [Source: com.ibm.ws.webcontainer.srt.http.HttpInputStream@8813ee4a; line: 38, column: 10] ",observed that error is due to LoyaltyIndicator,PLCCIndicator fields.
so my question is how i fetch this 2 fields data with data source in my request,is it the right approch-${DataSource#Loyalty_ID},${DataSource#PLCC_ID} ?
Hi Amarnath,
Could you please try below approach for the issue:-
- Format the excel cell and set as "Text". -> Right click on the cell->Format Cells->From Category->Select Text.
- And then in groovy code:- String localtyID = ${DataSource#Localty_ID}.
Hope, this can help you out. Let me know after you try this approach and send the screenshot of the error you get.