简体   繁体   English

实际上,JAX-WS是什么?

[英]what actually JAX-WS is?

I need to work on webservice project. 我需要从事网络服务项目。 So going through book to cover the basics of webservice project. 因此,本书将介绍Webservice项目的基础知识。 But these are questions I am struggling with:- 但是这些是我正在努力解决的问题:

1.Java API for XML Web Services(JAX-WS):- JAX-WS is nothing but just a java programming language API for creating web services which is now a part of core java starting from version 6 (though originally developed as part of Java Web Services Development Pack). 1.用于XML Web Services的Java API(JAX-WS):-JAX-WS只是用于创建Web服务的Java编程语言API,它现在是从版本6开始的核心Java的一部分(尽管最初是作为Java Web Service的一部分开发的) Java Web服务开发包)。 Is it right? 这样对吗?

2.All other webservices framework whether it is metro, jersey, glassfish uses the JAX-WS internally. 2.所有其他Web服务框架(无论是Metro,Jersey,glassfish)都在内部使用JAX-WS。 Is it correct? 这是正确的吗?

Q: 1.Java API for XML Web Services(JAX-WS):- JAX-WS is nothing but just a java programming language API for creating web services which is now a part of core java starting from version 6 (though originally developed as part of Java Web Services Development Pack). 问: 1.用于XML Web Services的Java API(JAX-WS):-JAX-WS只是用于创建Web服务的Java编程语言API,它现在是从版本6开始的核心Java的一部分(尽管最初以Java Web服务开发包的一部分)。 Is it right? 这样对吗?

It is correct, JAX-WS is an application programming interfaces (API). 没错,JAX-WS是一个应用程序编程接口(API)。 That API, together with the JAX-WS reference implementation ( JAX-WS RI , RI = reference implementation) is a part of JDK since version 6. To extend a little bit, JAX-WS 2.0 is included in JDK 6 from the beginning, JAX-WS 2.1 comes with JDK 6u4, and you will find JAX-WS 2.2 in JDK 7 (see this link ). 该API以及JAX-WS参考实现( JAX-WS RI ,RI =参考实现)自版本6以来就是JDK的一部分。为了扩展一点,JDK 6从一开始就包含JAX-WS 2.0, JAX-WS 2.1随JDK 6u4一起提供,您将在JDK 7中找到JAX-WS 2.2(请参阅此链接 )。

Q: 2.All other webservices framework whether it is metro, jersey, glassfish uses the JAX-WS internally. 问: 2。所有其他Web服务框架(无论是Metro,Jersey,glassfish)都在内部使用JAX-WS。 Is it correct? 这是正确的吗?

Strictly speaking, Metro doesn't "use" JAX-WS, but includes already mentioned JAX-WS reference implementation. 严格来说,Metro并不“使用” JAX-WS,而是包括已经提到的JAX-WS参考实现。 Jersey included JAX-RS implementation, and Glassfish is not a Web-service framework, but an application server. Jersey包含JAX-RS实现,Glassfish不是Web服务框架,而是应用程序服务器。 Glassfish comes with the complete Metro distribution. Glassfish随附完整的Metro发行版。

JAX-WS is a Web Services framework that provides tools and infrastructure to develop Web Services solutions for the end users and middleware developersJAX-WS stands for Java API for XML Web Services. JAX-WS是一个Web服务框架,为最终用户和中间件开发人员提供工具和基础结构,以开发Web服务解决方案。JAX-WS代表XML Web Services的Java API。 JAX-WS is a technology for building web services and clients that communicate using XML. JAX-WS是一种用于构建使用XML进行通信的Web服务和客户端的技术。 JAX-WS allows developers to write message-oriented as well as RPC-oriented web services. JAX-WS允许开发人员编写面向消息的以及面向RPC的Web服务。 In JAX-WS, a web service operation invocation is represented by an XML-based protocol such as SOAP. 在JAX-WS中,Web服务操作调用由基于XML的协议(例如SOAP)表示。 The SOAP specification defines the envelope structure, encoding rules, and conventions for representing web service invocations and responses. SOAP规范定义了信封结构,编码规则以及用于表示Web服务调用和响应的约定。 These calls and responses are transmitted as SOAP messages (XML files) over HTTP. 这些调用和响应通过HTTP作为SOAP消息(XML文件)传输。

There is another type of web-service, which is called RESTful.RESTful web services are built to work best on the Web. 还有另一种Web服务,称为RESTful.RESTful Web服务被构建为在Web上运行最佳。 Representational State Transfer (REST) is an architectural style that specifies constraints, such as the uniform interface, that if applied to a web service induce desirable properties, such as performance, scalability, and modifiability, that enable services to work best on the Web. 代表性状态转移(REST)是一种体系结构样式,用于指定约束(例如统一接口),如果将约束应用于统一的Web服务,则可以带来所需的属性(例如性能,可伸缩性和可修改性),这些属性使服务可以在Web上最好地工作。 In the REST architectural style, data and functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs), typically links on the Web. 在REST体系结构样式中,数据和功能被视为资源,并使用统一资源标识符(URI)(通常是Web上的链接)进行访问。 The resources are acted upon by using a set of simple, well-defined operations. 通过使用一组简单的,定义明确的操作对资源进行操作。 The REST architectural style constrains an architecture to a client/server architecture and is designed to use a stateless communication protocol, typically HTTP. REST体系结构样式将体系结构限制为客户端/服务器体系结构,并设计为使用无状态通信协议(通常为HTTP)。 In the REST architecture style, clients and servers exchange representations of resources by using a standardized interface and protocol. 在REST体系结构样式中,客户端和服务器通过使用标准化的接口和协议来交换资源的表示形式。

Genrally JAX-RS is used for developing RESTful web services. 通常,JAX-RS用于开发RESTful Web服务。 JAX-RS is a Java programming language API designed to make it easy to develop applications that use the REST architecture. JAX-RS是一种Java编程语言API,旨在使开发使用REST体系结构的应用程序变得容易。 The JAX-RS API uses Java programming language annotations to simplify the development of RESTful web services. JAX-RS API使用Java编程语言注释来简化RESTful Web服务的开发。 Developers decorate Java programming language class files with JAX-RS annotations to define resources and the actions that can be performed on those resources. 开发人员使用JAX-RS批注装饰Java编程语言类文件,以定义资源以及可以对这些资源执行的操作。 JAX-RS annotations are runtime annotations; JAX-RS注释是运行时注释; therefore, runtime reflection will generate the helper classes and artifacts for the resource. 因此,运行时反射将为资源生成帮助程序类和工件。 A Java EE application archive containing JAX-RS resource classes will have the resources configured, the helper classes and artifacts generated, and the resource exposed to clients by deploying the archive to a Java EE server. 通过将归档文件部署到Java EE服务器,包含JAX-RS资源类的Java EE应用程序归档文件将配置资源,生成帮助程序类和工件,并向客户端公开该资源。

Different frameworks uses either JAX-WS or JAX-RS. 不同的框架使用JAX-WS或JAX-RS。 Jersey uses JAX-RS and Metro uses JAXWS. Jersey使用JAX-RS,Metro使用JAXWS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM