Skip to Content
0
Sep 22, 2020 at 01:10 AM

java.util.ArrayList cannot be cast to java.util.HashMap - occurred while responding back to client

1566 Views Last edit Sep 22, 2020 at 01:51 AM 2 rev

Hi All,

I am implementing the oData service in CPI that consumes SOAP web service in ByDesign. From Postman, I can call the oData service that internally calls the SOAP service and the response is mapped to oData data model. I have logged the response in CPI, but it errors out at the last step with the message java.util.ArrayList cannot be cast to java.util.HashMap. From the error, I understand that the the output generated from CPI is of ArrayList type, but when the response goes back to client, the conversion happens internally and the destination type is HashMap. As the source and destination object types are different, it errors out. Is there something wrong with oData data model? How does the internal conversion work?

I have attached the data model EDMX file and WSDL file for reference. Also attached sample input and output messages to the oData service in CPI and the response mapping. Please guide me to fix this issue.

querysitelogisticstaskwsdl.txt

odata-datamodeledmx.txt

input-message-to-odata-service.txt

output-message-from-odata-service.txt

response-mapping.png