Hi,
I just started to use odata4j on Android, and I managed to read data from a WCF-based Odata data source.
I'd like to change one of the entity's single String property, but I (surprisingly) get a message about this:
"Caused by: org.odata4j.exceptions.BadRequestException: Error processing request stream. Error encountered in converting the value from request payload for property 'BDate' to type 'System.DateTime', which is the property's expected type. See inner exception for more detail.'"
ODataConsumer c = ODataJerseyConsumer.newBuilder(ListActivity.url)
.setFormatType(FormatType.ATOM).build();
ODataJerseyConsumer.dump.all(true);
OEntity ent = c.getEntity(entitySetName, localObject.ID).execute();
System.out.println("Actual key - " + ent.getEntityKey());
System.out
.println("objType - " + ent.getProperty("BDate").getClass());
System.out
.println("objValue - " + ent.getProperty("BDate").getValue());
c.updateEntity(ent)
.properties(OProperties.string("Name", localObject.Name + "2")).execute();
The object class for the problematic DateTime object is org.odata4j.core.OProperties$Impl, and it's value: 1994-11-03T00:00:00.000
I don't understand why it tries to update that value (I just want to update the Name), too, and if does, why throws exception (I simply try to put back the object I just read from the data source).
Can you help me?