什么时候使用哪个Web服务,为什么? [英] When to use which web service and why ?

查看:87
本文介绍了什么时候使用哪个Web服务,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Java Developer,何时使用哪种Web服务感到困惑,我应该使用JAX-WS还是JAX-RS或任何其他第三方,为什么?
请通过以下示例提供帮助:
1.)如果我要制作登录表单,哪种Web服务更好,或者根本不需要Web服务?
2.)如果您尝试制作新闻简报,订阅者,则提醒应该使用哪个Web服务?

当我决定该类型的应用程序需要Web服务而该类型不需要Web服务时,请帮助我?

我在Google上搜索,发现Web服务有助于Web应用程序的性能,灵活性等.但是,如果是这样,应该使用哪种Web服务?为什么?

请用适当的示例向我解释?

I am Java Developer, i am confused when to use which web services, either i should use JAX-WS or JAX-RS or any other 3rd party & why?
Please help by an example like:
1.) if i am making Login form which web services is better or their is no need of web services at all ?
2.) if you try to make newsletter, subscriber, reminder which web service should be used ?

Please help me when i should decide that this type of application required web service and this type doesn''t required web service ?

I googled and found web service help the performance, flexibility, etc of Application of Web. But if so which web service should be used and why ?

Please explain me with appropriated example ?

推荐答案

选择JAX-W还是JAX-RS是一个选择问题.区别在于JAX-RS重量轻,可以处理HTTP中的所有请求.另一方面,JAX-WS是独立于传输协议的,并且您可以使用HTTP,SMTP等.如果您的应用程序很繁重并且需要很高的安全性,并且所有其他WS- *用于服务,则最好使用JAX-WS. .

但是,如果您的应用程序是网站,则我认为没有必要使用Web服务. Web服务主要用于企业对企业之间的通信,其中使用多个系统,而不仅仅是普通用户与系统进行交互.
It is a matter of choice which you select either JAX-Ws or JAX-RS. The difference is that JAX-RS is light weight and handles all requests in HTTP. On the other hand, JAX-WS is transport protocol independent, and you can use HTTP, SMTP, etc. JAX-WS is best to use if your application is heavy and requires a lot of security and all other WS-* for the services.

However, if your application is a website, I don''t think it''s necessary to have a webservice. Webservices are mostly used for Business-to-Business communication, where multiple systems are used and not just a normal user interacting with the system.


这篇关于什么时候使用哪个Web服务,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆