结合地铁和泽西岛

发布于 2024-10-02 07:57:22 字数 398 浏览 0 评论 0原文

我已经在这个问题上呆了一段时间了,我的思绪已经变得混乱了。

我想知道是否有人可以帮助我。我正在尝试创建一个支持 Metro 和 Jersey 的 Java Web 服务(使用它自己的 HTTP 服务器,而不是像 tomcat 这样的服务器)。这样,客户端可以按照自己的意愿连接到 Web 服务,无论是 SOAP 还是 REST。

我已经把 Metro 部分放下了,这样它就可以支持 Doc/Lit wsdls 和 RPC/lit wsdls 但我很难理解 Jersey 部分,所以它将支持 REST/xml 和 REST/json

另外这个想法是,会有是一个类,其中编写了所有端点方法,并且其他类将扩展它。

有人以前结合使用过这两个吗?您能给我指出一篇像样的文章的方向吗?或者您自己有一个例子吗?

谢谢

I've been at this for a little while and my mind has gone to mush.

I'm wondering if anyone can help me out here. I'm trying to make a Java Web Service (using its own HTTP server and not something like tomcat), that supports Metro and Jersey. This way a client can connect to the web service anyway they want whether it is SOAP or REST.

I've got the metro part down so it can support Doc/Lit wsdls and RPC/lit wsdls but I've having some difficultly understanding the Jersey part so it will support REST/xml and REST/json

Also the idea is that there would be one class where all the endpoint methods are written in and other classes would extend it.

Has anyone used these two combined before? Can you point me the direction of a decent article or do you have an example yourself?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蒗幽 2024-10-09 07:57:22

MetroJAX-WS 的实现,主要用于基于 WSDL/SOAP 的 Web 服务。
JeseryJAX-RS 的实现,用于基于 Restful 的 web 服务的 maily。
我在同一个项目中使用了两者,但目的不同。您还可以使用 apache httpclient 来实现 Restful 服务,但是 jersery 提供了许多有用的注释来转换为 json、xml 等。希望它有所帮助。

Metro is a implementaion of JAX-WS used mainly for WSDL/SOAP based webservices.
Jesery is a implementation of JAX-RS used maily for Restful based webservices.
I have used both in the same project but for different purposes. You can also use apache httpclient for restful services, but jersery provides lot of useful annotations for converting to json, xml etc. Hope it helps.

陌生 2024-10-09 07:57:22

当你说你想支持泽西岛时,我有点困惑你的意思。 Jersey 是 JAX-RS (JSR-311) 的实现。您的意思是您想要支持 JAX-RS 吗?

I am a bit confused about what you mean when you say you want to support Jersey. Jersey is an implementation of JAX-RS (JSR-311). Do you mean you want to support JAX-RS?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文