Java Interview Guide: How to Build Confidence With a Solid Understanding of Core Java Principles pdfdrive com



Yüklə 0,53 Mb.
Pdf görüntüsü
səhifə24/47
tarix06.05.2023
ölçüsü0,53 Mb.
#108601
1   ...   20   21   22   23   24   25   26   27   ...   47
Java Interview Guide

Web Services
Service-Oriented Architecture
Service-oriented architecture (SOA) is a pattern that provides services to clients
over a network. Services span a wide array of applications, including anything
from delivering emails to generating random numbers via atmospheric noise.


Web Services
A web service is an implementation of SOA over the internet. Web services
expose a contract that is independent of platforms or programming languages.
The two most popular implementations are Simple Object Access Protocol
(SOAP) and Representational State Transfer (REST).


SOAP
SOAP is a communication protocol that uses XML to define a Web Services
Description Language (WSDL). The API described by WSDL documents can
be parsed by consumers to generate classes automatically. The Java API for
XML Web Services (JAX-WS) provides the specification for producing SOAP-
based web services via annotations. Apache CXF is a popular open source
implementation of JAX-WS.


REST
REST is a pattern for designing web services that rely on the HTTP protocol
alone. REST web services expose meaningful URLs that utilize the GET, POST,
PUT, and DELETE methods to access resources. REST architecture does not
specify a standard data format, but JSON is frequently used as a lightweight
alternative to XML. The Java API for RESTful Web Services (JAX-RS)
provides the specification for producing REST-based web services via
annotations. Jersey is a popular open source implementation of JAX-RS.


SOAP vs REST
SOAP web services are useful when a rigid contract is required to support
complex operations between tightly coupled systems. REST web services are
more flexible, but the lack of a WSDL document can be prohibitive for complex
services. SOAP web services are generally slower than REST due to the
verbosity of XML payloads.


Questions
What is service-oriented architecture?
What are web services?
What is the difference between a SOAP web service and a REST web service?
What is the difference between JAX-WS and JAX-RS?
What are some frameworks that aid in the development of Java web services?



Yüklə 0,53 Mb.

Dostları ilə paylaş:
1   ...   20   21   22   23   24   25   26   27   ...   47




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin