olingo

Writing Integration Test of ExpressionVisitor with Olingo / ODATA 4

孤者浪人 提交于 2019-12-11 04:17:39
问题 I'm implementing a web service respecting version 4 of the OData standard in Java language with the framework Olingo. I need to customize the response of $filter . I've implemented a Visitor as documented in the quick start. I need to implement an integration Test to try a different kind of grammar and to prevent regression bug in case of future maintenance. For the V2, I found the following tutorial and the following code : @Test public void printExpressionWithProperty() throws Exception { /

Why is $expand not working correct in my JPA/Olingo project

让人想犯罪 __ 提交于 2019-12-11 01:53:57
问题 I am currently working on a JPA/Olingo based odata service. The Olingo version used is 2.0.7. The JPA implementation used is eclipselink version 2.5.1. There are two entities connected through a OneToMany relationship (Company, Page). Requesting the company from the service (e.g. /odata/v2/Companies) without an $expand works fine. The same for requesting the pages. Requesting pages and expanding the CompanyDetails works fine as well. Somehow requesting the company and expanding the associated

How to create a bounded action in Olingo V4 (java)

我与影子孤独终老i 提交于 2019-12-10 15:44:17
问题 I have tried looking everywhere but couldn't figure out how to implement bounded actions in olingo V4 java. Everywhere unbounded action tutorial is given. I tried tweaking this code. final CsdlAction action = new CsdlAction(); action.setName("testAction"); action.setBound(true); This gives me error when I try to access $metadata API. If anyone can point me towards a good tutorial on how to go about it then it would be great. 回答1: I looked into the source code of olingo and debugged their code

How can I consume an OData4 service in Java using either Olingo or the SDL OData Framework

落爺英雄遲暮 提交于 2019-12-07 03:14:57
问题 I need to consume an OData4 service from Java and based on the list of frameworks on the OData website the two choices are Olingo or the SDL Odata Framework. My problem is that the documentation for both of these projects are focused on writing a service not consuming one. The Olingo site links to a blog post from 2014 which is not API compatible with the current version and I couldn't find anything on the SDL github pages. If someone could just provide me with a simple POST / GET example

How can I consume an OData4 service in Java using either Olingo or the SDL OData Framework

强颜欢笑 提交于 2019-12-05 07:08:17
I need to consume an OData4 service from Java and based on the list of frameworks on the OData website the two choices are Olingo or the SDL Odata Framework . My problem is that the documentation for both of these projects are focused on writing a service not consuming one. The Olingo site links to a blog post from 2014 which is not API compatible with the current version and I couldn't find anything on the SDL github pages. If someone could just provide me with a simple POST / GET example with using a proper POJO object model that would be great. My limited understanding is that OData moves

Olingo - Create strongly typed POJOs for client library of OData service

不羁岁月 提交于 2019-11-30 19:27:46
I'm using Apache Olingo as an OData client for a Java SDK that I will provide for a RESTful OData API. In the SDK I want to be able to have strongly typed classes to represent the OData entities. I'm having trouble implementing this easily and thus feel like I'm missing a different strategy here. The Olingo way seems to be to get an ODataClient object which provides the user with a bunch of useful methods for interacting with the API. The ODataClient is using a bunch of factory methods to build my request. For instance, this is the code I used to get the Customers from the Northwind sample

Olingo - Create strongly typed POJOs for client library of OData service

断了今生、忘了曾经 提交于 2019-11-30 03:13:42
问题 I'm using Apache Olingo as an OData client for a Java SDK that I will provide for a RESTful OData API. In the SDK I want to be able to have strongly typed classes to represent the OData entities. I'm having trouble implementing this easily and thus feel like I'm missing a different strategy here. The Olingo way seems to be to get an ODataClient object which provides the user with a bunch of useful methods for interacting with the API. The ODataClient is using a bunch of factory methods to