Concepts related to Java RESTful Web Service

Source: Internet
Author: User
Tags stream api

Concepts related to Java RESTful Web Service

 

Followed by the previous article REST | RESTful preliminary understanding: http://1.liangtao.sinaapp.com /? After p = 639, I encountered some problems in my next understanding. The architecture of Java WebService, which is not quite familiar with, has caused some technical terms to be "yes" rather than ". For some technologies, several norms do not have a general understanding. This article is about the specification and technology of the RESTful WebService architecture in Java.

Web Service

In terms of representation, Web service is an application that exposes an API (regardless of language or platform) that can be called through the web ).

From a deeper perspective, Web service is a new web Application Branch. They are self-contained, self-described, and modular applications. He complies with certain technical specifications and agreements. Therefore, WebService is not a specific technology. It is more like a standard. In fact, webservice is W3C standard:

Web Services is an application component.
Web Services uses development protocols for communication
Web Services are independent and self-describing
Web Services can be discovered through the use of UDDI
Web services can be used by other applications
Make the above knowledge about Web Services.

 

JWS

Java EE technology related to Web Services.

Specifically, JWS includes the following technologies:

JAX-WS: java api for XML Web Service
JAX-RS: Java API for RESTful Web Services
JAXB: Java Architecture for XML Binding industry standard, which generates java classes based on XML Schema
JAXR: Java API for XML Registries provides APIs for interacting with multiple types of registration services
SAAJ: API specification based on XML message transmission implemented by loose coupling software system based on SOAP protocol.
StAX: Stream API for XML. Unlike SAX, StAX uses a Stream-based mechanism to analyze and generate XML documents.

Here you need to understand the difference between JAX-WS and JAX-RS:

The two are different styles of SOA architecture. The former is centered on verbs and specifies the function to be executed each time. The JAX-WS is message-oriented and specifies the specific request method for each request, for example: http: // localhost: 8080/demo/getStudentList.

The latter is a noun-centered resource URI. JAX-RS is resource-oriented, each request only for resource operations: add, delete, modify query, It standardizes the definition of Java RESTful style (term form release API)

JAXB is a Java XML Binding, a tool for converting objects and XML at the underlying layer of JAX-RS and JAX-WS.

Both JAX-WS and JAX-RS are used to implement JWS, but they have different styles. The implementation of JAX-WS is based on SOAP protocol and message oriented. JAX-RS is the provision of API specifications for REST-based Web Services. For more information about REST, see: http://1.liangtao.sinaapp.com /? P = 639

JAX-WS and JAX-RS implementation

Frameworks that support JAX-WS service specifications include CXF, Axis, and Xfile.

The frameworks supporting JAX-RS service specifications include CXF, Jersey, RESTEasy, Restlet.

Overall framework

After talking so much about it, I attached the overall framework diagram. After learning about the above concepts, I can see that this framework diagram has a clear idea.

 

Over!

Related Article

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.