I am new to apache olingo web service. I hit the last two weeks to implement a filter and pagination on my service. I use the latest version of olingo 4. I google and watch a lot of blogs, but there are no clear explanations. Please help me with a sample code. It will be more good for me.
Below is my script,
I retrieve data from an existing web service as XML, and then parse the XML using JAXB to make it like a list of objects in olingo web services.
Here is how I can apply a filter. If I have a $ filter filter in my URL, it means that I selected an exception from the page not found. If I remove, it means that it will work and give the full result.
My question is: how to apply the olingo filter in an XML string or How to apply it in the list of objects that I have in a method. Please give me an explanation with some sample code.
I need to specify pagination on my JSON response. I need to limit the JSON value to 25 per page and you will also need the following page URL (25 to 50). How to implement this as well.
I overcame many blogs, but did not work for me. Here is https://templth.wordpress.com/2015/04/03/handling-odata-queries-with-elasticsearch/
On this blog they did not explain with the full code. My problem is that I get data from an existing web service as an XML string and parse it and have an entity in the list.
And I also link to this blog,
https://olingo.apache.org/doc/odata2/tutorials/Olingo_Tutorial_AdvancedRead_FilterVisitor.html
This blog also explains how to build a query. My problem is how to implement $ filter, $ select, etc. from ODATA in my web service and how to filter from an xml string or list of objects
Please offer me a sample code. Thanks.
source share