正在寻找如何用 Java 开发 odata 服务的好教程(使用 restlet、jersey 或 odata4j)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6343857/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 15:29:50  来源:igfitidea点击:

Looking for a good tutorial how to develop odata service in Java (with restlet, jersey, or odata4j)

javaodataodata4j

提问by Skarab

I am looking for a tutorial that shows step by step how to develop an odataservice using Java.

我正在寻找一个教程,逐步展示如何使用 Java开发odata服务。

采纳答案by jtoberon

The odata4j docs about deploying a service in Tomcat look decent: http://code.google.com/p/odata4j/wiki/Tomcat

关于在 Tomcat 中部署服务的 odata4j 文档看起来不错:http: //code.google.com/p/odata4j/wiki/Tomcat

Also see answers to a similar question: How do I interact with OData from Java?. That question covers odata clients in Java, but several of the links are relevant.

另请参阅类似问题的答案:如何与 Java 中的 OData 交互?. 该问题涵盖 Java 中的 odata 客户端,但有几个链接是相关的。

回答by cking24343

If you want to get an idea of how to access and work with Odata from a client side you could try taking a look at this tutorial:

如果您想了解如何从客户端访问和使用 Odata,您可以尝试查看本教程:

http://weblogs.asp.net/uruit/archive/2011/09/13/accessing-odata-from-android-using-restlet.aspx.

http://weblogs.asp.net/uruit/archive/2011/09/13/accessing-odata-from-android-using-restlet.aspx

It shows how to take an existing WCF service and auto generate the following class files for you to use within your applications. However, this example is specifically for Android and uses the Restlet library, but hopefully this can give you an idea as to how to access / use it.

它展示了如何使用现有的 WCF 服务并自动生成以下类文件供您在应用程序中使用。但是,此示例专门针对 Android 并使用 Restlet 库,但希望这可以让您了解如何访问/使用它。