oData4j sample eclipse project

1,070 views
Skip to first unread message

Alin

unread,
Sep 26, 2012, 9:14:42 AM9/26/12
to odata4j...@googlegroups.com

I have downlaoded oData4J jar files from odata.org and I intend to do a sample producer, within a bsaic web service. I assumed that InMemoryProducerExample.java from http://code.google.com/p/odata4j/ will do the job and most probably it is. My problem is that I have no clue which type of project to create (Eclipse Java), how to deploy and test this example. Does anyone have such a start up hellow world tutorial for odata step by step, or an eclipse project which use InMemoryProducerExample.java from oData. I really need a starting point and I can't see one online.

Thanks

Luke Han

unread,
Oct 4, 2012, 8:02:04 PM10/4/12
to odata4j...@googlegroups.com
you can download the example project of odata4j as your startup project, it's already contain jetty server inside and you can directly run it as java program.

For eclipse, I think you can create dynamic web project and put all the odata4j jars to web-inf/lib, copy the InMemoryProducerExample.java to source folder. config web.xml to support Tomcat (http://code.google.com/p/odata4j/wiki/Tomcat). then, run it on server (just like other REST web service project)

Hope this will give you a little help
Thanks.

Luke


在 2012年9月26日星期三UTC+8下午9时14分42秒,Alin写道:

Sivaguru Theerthamalai

unread,
Oct 30, 2012, 8:47:59 AM10/30/12
to odata4j...@googlegroups.com

Luke,

How to configure the database and pull/add/update/delete the data from odata producer?

thanks
Sivaguru Theerthamalai

Luke Han

unread,
Oct 30, 2012, 10:20:49 AM10/30/12
to odata4j...@googlegroups.com, Sivaguru Theerthamalai
Hi Sivaguru,
    If you are using OData4J 0.7, you can considering it's built-in JPA producer. it will easy to expose existing Database table as OData Entity through it's JPA producer.
    Please refer to it's example for more detail, I remember there are something like Addressbook...you can browser it's source code (under the same google project) for the whole samples.
    Let me know if you need more help.
    Thanks.

armharish

unread,
Aug 15, 2016, 11:36:15 PM8/15/16
to odata4j-discuss
Hi Sivaguru,

Were you able to get through this? Please help with step by step instructions. I want to expose my DB tables (mysql or oracle) as rest service using odata. 

Thanks in advance..

Thanks 
Hari

Ralf Handl

unread,
Aug 17, 2016, 3:29:13 AM8/17/16
to odata4j-discuss
Hi Hari,

You might want to have a look at Apache Olingo and its JPA processor, see http://olingo.apache.org/doc/odata2/index.html 

Thanks
Ralf
Reply all
Reply to author
Forward
0 new messages