Forum Discussion

almond77's avatar
10 years ago

Pass complex object array as parameter with json format

I am new to use SoapUI tool to test rest api service. I need to pass an object array as parameter to the service. I need pass parameter "item" as:

{"type":"java.util.ArrayList", "values": [{"class-type": "commerce.order.purchase.AddCommerceItemInfo", "catalogRefId": "OPT2230346","productId": "24157","quantity": 1}]}}

However, SoapUI always considered pass the parameter as an string, instead of an array. I got the follow error in the rest service side: "Caused by: javax.el.PropertyNotFoundException: Property '0' not found on type java.lang.String". I tried to change Media Type to "application/json" and it does not work out.

Any idea? Thanks!