I'm attempting to make an Odata post using odata4j. After dumping the posted xml data, I copied it into a php script using curl just to test. I found out that the xml post is missing the "category" element which is required for a post.
I can't seem to figure out the appropriate method, looking at the odata4j javadocs, to be able to create this element within the entity structure.
Any thoughts on this? I've posted a slightly simplified version of my code.
// create the new request object
OCreateRequest<OEntity> createRequest = consumer.createEntity( "ESvcOrderTrans" )
.properties( OProperties.int32( cursorWrapper.getColumnName(0), cursorWrapper.getInt(0))
.properties( OProperties.string( cursor.getColumnName(1), cursor.getString(1) ));
// Execute the OData post
OEntity newMaterial = createRequest.execute();