I want to save this object in to database with wso2 dss. but it is showing there is an error in the date format.
Value type miss match, Expected value type - 'dateTime', but found - 'STRING'
example post messgae is this
{
"insert_subscribe_merchant_operation":
{
"customerrefid": 1,
"merchantrefid": "1",
"datetime": "2012-03-14T00:00:00+05:30",
"registereddevice":"1234567890",
"latlongregistered": "xczv",
"totalpoints":1000,
"redeemablepoints":800,
"expirydate": "2012-03-14T00:00:00+05:30",
"qrcode": "xvc",
"currentoffercount":10,
"schemerefid":1
}
}
but when i tried with the xml type it is working fine
<insert_subscribe_merchant_operation>
<customerrefid>1</customerrefid>
<merchantrefid>"1"</merchantrefid>
<datetime>2012-03-14T00:00:00+05:30</datetime>
<registereddevice>"1234567890"</registereddevice>
<latlongregistered>"234"</latlongregistered>
<totalpoints>876</totalpoints>
<redeemablepoints>345</redeemablepoints>
<expirydate>2012-03-14T00:00:00+05:30</expirydate>
<qrcode>"?"</qrcode>
<currentoffercount>20</currentoffercount>
<schemerefid>1</schemerefid>
</insert_subscribe_merchant_operation>
Please help me !!!!
This is fixed in the DSS upcoming release (3.5.1). The related JIRA is DS-1190. As a workaround you can switch to org.apache.axis2.json.JSONMessageFormatter and org.apache.axis2.json.JSONOMBuilder as suggested.