On 18/06/2015 14:40, Ramesh Reddy wrote:
Thanks.

I am using the last option you mentioned, "getClient()", I am not sure what the 
difference yet with "getEDMClient()" methods, and advantages over the other.

The Java methods you get access to are exactly the same.

The difference is in the way how JSON payloads are interpreted: when you know in advance (EdmEnabledClient) that a certain property is of type Edm.Date you will not need any @odata.type information during parsing to interpret its values as Date.

And so on, for complex properties, function / action parameters and invocation...

HTH
Regards.

----- Original Message -----
On 17/06/2015 22:27, Ramesh Reddy wrote:
Hi,

When using Olingo V4 client and issuing a Entity request, I observed that
the default ODataFormat is to "application/json;odata.metadata=full", then
the request fails with 406. I know, Olingo is process of supporting the
"odata.metadata=full", but the question I have wouldn't it be better this
is mapped to "odata.metadata=minimal"?

I see that one can set this client configuration, but having a good default
will save some time for a client developer. WDYT?
IIRC, the default format returned by default by client library is

   * ODataFormat.JSON ("odata.metadata=minimal") for EdmEnabledClient,
e.g. for client library which requires Edm Metadata document fetch and
parse prior to any further operation
Obtain such instances via

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java#L32

or

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java#L36

   * ODataFormat.JSON_FULL_METADATA ( Konsole output
"odata.metadata=full") for 'plain' Client, e.g. for client library which
does not require anything before start issuing OData calls
Obtain such instances via

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java#L28

HTH
Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to