wso2 DSS 值类型未匹配,预期值类型 - 'dateTime',但找到 - 'STRING'

wso2 DSS Value type miss match, Expected value type - 'dateTime', but found - 'STRING'

我想用 wso2 dss 将这个对象保存到数据库中。但显示日期格式有误。

Value type miss match, Expected value type - 'dateTime', but found - 'STRING'

示例post消息是这样的

{
"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
      }
}

但是当我尝试使用 xml 类型时它工作正常

<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>

请帮帮我!!!!

通过修改 wso2 dss 解决了这个问题axis2.xml

<messageFormatter contentType="application/json"
              class="org.apache.axis2.json.JSONMessageFormatter"/>
<messageBuilder contentType="application/json"
                class="org.apache.axis2.json.JSONOMBuilder"/>

通过删除 Gson 格式化程序。

此问题已在即将发布的 DSS 版本 (3.5.1) 中修复。相关的 JIRA 是 DS-1190。作为解决方法,您可以按照建议切换到 org.apache.axis2.json.JSONMessageFormatter 和 org.apache.axis2.json.JSONOMBuilder。