Java RESTful WEB Service-related concepts

Source: Internet
Author: User
Tags soap stream api

Original Address: http://1.liangtao.sinaapp.com/?p=647

the next article rest| RESTful preliminary understanding: After http://1.liangtao.sinaapp.com/?p=639, in the following understanding also encountered some problems, not quite understand the Java WebService this set of architecture, resulting in some technical terms is not, For a number of technologies, some specifications do not have a holistic understanding. This article is an understanding of the specifications and techniques of the RESTful WebService architecture in Java.

Web Service

from the point of view, a Web service is an application that exposes an API that can be called via the Web (no language, platform).

In the deep sense, Web service is a new branch of Web application, they are self-contained, self-describing, modular applications. He follows certain technical specifications and agreements. So webservice is not a specific technology, he is more like a standard, in fact WebService is the standard:

Web Services is an application component
WEB Services uses development protocols for communication
WEB services are independent and can be self-described
WEB Services can use UDDI to discover
Web Services can be used by other applications
for Web service, do the above knowledge first.


JWS

refers to the Java EE Technology associated with Web service, the full name of which is WebService.

In particular, JWS contains the following techniques

Java API for Jax-ws:xml Web service
Jax-rs:java API for RESTful Web Services
Jaxb:java Architecture FOR XML binding industry standard, generating Java classes based on XML Schema
Jaxr:java API for XML registries provides APIs to interact with multiple types of registration services
SAAJ: A loosely coupled software system based on the SOAP protocol implementation of the API specification based on XML message delivery.
Stax:stream API FOR XML, unlike sax, StAX uses a stream-based mechanism for parsing and generating XML documents.

Here you need to understand the difference between Jax-ws and Jax-rs:

Both are different styles of SOA architectures. The former takes the verb as the center and specifies that the function is executed every time. JAX-WS is message-oriented, with each request specifying a specific request method, for example: Http://localhost:8080/demo/getStudentList.

The latter is a noun-centric one, and each time it is executed, it refers to the resource URI. Jax-rs is resource-oriented, and each request only operates on resources : additions and deletions, which define Java's restful style (noun form Publishing API)

JAXB is a Java XML Binding that is the tool used by Jax-rs and Jax-ws to convert objects and XML .

Jax-ws and JAX-RS are used to implement JWS, but the two styles differ, and JAX-WS implementations are based on the SOAP protocol, which is message-oriented. Jax-rs is an API specification for Web service based on restful design style. For rest, refer to:http://1.liangtao.sinaapp.com/?p=639

Jax-WS and JAX-RS implementations

the frameworks that support the JAX-WS service specification are: Cxf,axis,xfile.

The framework for supporting the JAX-RS service specification is: Cxf,jersey,resteasy,restlet.

Overall framework Diagram

Having said so much, with the overall frame diagram, after understanding the above concepts, look at this frame diagram will have a sense of what it is, clear thinking.


over!

Java RESTful WEB Service-related concepts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.