elmarakby / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

Unknown ODataVersion 3.0 #265

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I want to retrieve data from my webservice Odata created in C#. I have changed 
the dataserviceversion to 2.0 and it is also reflected in metadata.

When I consume the webservice at Java project,, I am supposed to see the result 
but the error appears as Unknown ODataVersion 3.0

Please assist, thanks.

Original issue reported on code.google.com by chufang_...@hotmail.com on 8 Aug 2013 at 11:18

GoogleCodeExporter commented 9 years ago
Try to add following Behavior when creating conusmer:
new OClientBehavior() {
  @Override
  public ODataClientRequest transform(ODataClientRequest request) {
    return request.header("MaxDataServiceVersion", ODataVersion.V2.asString);
  }
}

Original comment by jaroslav...@slevovesms.cz on 20 Sep 2013 at 11:02