JAVA 51 - 100
RESTful Web Services Quiz
Test your knowledge on RESTful web services with this engaging quiz designed for developers, students, and enthusiasts alike. Dive into various aspects of REST architecture, HTTP methods, and JAX-RS annotations.
Featuring:
- 50 multiple choice questions
- Covers fundamental and advanced topics
- Perfect for self-assessment and learning
What REST stands for?
A - Represent State Transfer
B - REpresentational State Transfer
C - Represent State Transfer
D - None of the above.
Which of the following is true about REST?
REST is web standards based architecture and uses HTTP Protocol for data communication.
It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard methods.
REST was first introduced by Roy Fielding in 2000.
All of the above.
Which of the following is true about REST?
In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.
Each resource is identified by URIs/ global IDs.
REST uses various representations to represent a resource like text, JSON and XML.
All of the above.
Which of the following is not a valid HTTP methods used in RESTful web services?
GET
PUT
TIME
POST
Which of the following is not a valid HTTP methods used in RESTful web services?
OPTIONS
DELETE
DATE
POST
Which of the following is correct about web services?
A web service is a collection of open protocols and standards used for exchanging data between applications or systems.
Software applications written in various programming languages and running on various platforms can use web services to exchange data among them over computer networks like the Internet.
Both of the above.
None of the above.
Which of the following is correct about RESTful web services?
Web services based on REST Architecture are known as RESTful web services.
These web services use HTTP methods to implement the concept of REST architecture.
A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.
All of the above.
Which of the following is correct about resource representation in REST?
REST uses various representations to represent a resource where text, JSON, XML.
XML and JSON are the most popular representations of resources.
Both of the above.
None of the above.
Which of the following depicts best practice, Understandability for resource representation in REST?
Both Server and Client should be able to understand and utilize the representation format of the resource.
Format should be able to represent a resource completely. For example, a resource can contain another resource. Format should be able to represent simple as well as complex structures of resources.
A resource can have a linkage to another resource, a format should be able to handles such situations.
None of the above.
Which of the following depicts best practice, Completeness for resource representation in REST?
Both Server and Client should be able to understand and utilize the representation format of the resource.
Format should be able to represent a resource completely. For example, a resource can contain another resource. Format should be able to represent simple as well as complex structures of resources.
A resource can have a linkage to another resource, a format should be able to handles such situations.
None of the above.
Which of the following component of HTTP response contains response message content or Resource representation?
Status/Response Code
HTTP Version
Response Header
Response Body
Which of the following HTTP Status code means CREATED, when a resource is successful created using POST or PUT request?
200
201
204
304
Which of the following annotation of JAX RS API is used to annotate a method used to create resource?
@Path
@GET
@PUT
@POST
Which of the following annotation of JAX RS API states the HTTP Request type?
@DELETE
@HEAD
@Produces
@Consumes
REST is web standards based architecture and uses HTTP Protocol for data communication.
True
False
Each resource in REST architecture is identified by its URI.
True
False
Which of these is not a good step to take when creating secure mobile APIs?
Create APIs that don’t require developer registration
Leverage HTTPS to protect data in transit
Consider the inclusion of a JWT
Store API keys on your server in Base64 encryption
Which of these protocols can be used to create and manage APIs?
SOAP
REST
POSIX
All of the above
Which of these is a best practice to simplify the use of APIs?
Determine which API standards to use
Adhere to common API standards for authentication
Provide an open API that documents itself
All of the above
Which of the following is correct about JAX-RS?
JAX-RS makes heavy use of annotations available from Java SE 5 to simplify development of JAVA based web services creation and deployment.
It also provides supports for creating clients for RESTful web services.
Both of the above.
None of the above.
Which of the following annotation of JAX RS API binds the parameter passed to method to a form value?
@CookieParam
@FormParam
@DefaultValue
@Context
RESTful web services use HTTP methods to implement the concept of REST architecture.
True
False
Web services can treat each method request independently.
False
True
Which of the following browsers allow access to web services?
Internet Explorer
Safari
Mozilla Firefox
All options
RESTful web services are used because it
Is easy
Straightforward
Supports multiple data formats like XML, JSON e.t.c.
All options
Which of the following is a JAX-RS implementation in java?
Jersey
Jersy and RestEasy
RestEasy
Struts 1.0
Is REST is more readable than SOAP since it is based on use of nouns and verbs.
True
False
SOAP and REST are ______ and ______ web services types respectively.
Resource Oriented, Object Oriented
Object Oriented, Resource Oriented
Object Oriented, Object Oriented
Resource Oriented, Resource Oriented
REST uses ____ protocol for producing or consuming web service.
HTTP
FTP
SMTP
None
Which of these frameworks is used to build REST web services?
Restwork
Restframe
Restlet
None
What does SOAP define
The overall structure of the XML message
The conventions representing the remote procedure call in the XML message
All of the above.
A binding to HTTP
The conventions to wrap and send an error back to the sender
SOAP with Attachments API for Java (SAAJ) is
An API to produce, consume and manipulate the XML structure for the SOAP message programmatically.
An API to for XML messaging
An API for remote procedure calls
An API for AJAX requests
Java API for XML Parsing (JAXP) is
A standard XML parsing technique
A new XML parser implementation
A standard XML API that can be used by developers with over an XML parser.
None of the above
All of the above
Java API for XML based RPC (JAX-RPC)
Can be used to generate server side and client side Java (Web Service) code from a WSDL
Can be used to generate a WSDL from Java (Web Service) code
None of the above
Both answers are correct.
WSDL stands for:
Web Services Database Language
Web Services Description Language.
Web Service Definition Logic
Web Services Deployment Layer
Web Services Description Logic
A web service:
All of the above.
Serves web agents by processing and replying to requests over web
Is accessed via standard Internet application protocols like HTTP
Transfers data in requests and replies in XML and other formats
Is addressed by URIs
UDDI stands for:
Universal Database for Dynamic Interfaces
Uniform Dynamic Directory Interface
Uniform Description, Discovery and Integration
Universal Description, Discovery and Integration.
SOAP originally stood for:
Simple Object Access Protocol.
Strong Object Access Protocol
Simple Object Access Platform
Strong Object Access Platform
SOAP is an _________:
Javascript Based protocol
HTML Based Protocol
XML Based Protocol
None of the above.???
JAX-WS 2.0 replaced the JAX-RPC API in ________ :
Java (Programming Language)
Java Platform, Standard Edition
Java(Software platform)
Java Platform, Enterprise Edition.
The Reference Implementation of JAX-WS is developed as an ________ project and is part of project GlassFish, an open source Java EE application server.:
Open source.
Open-source software
Linux
Free software
The Java API for XML Web Services (JAX-WS) is a ________ API for creating web services.:
OpenSolaris
Java (programming language).
OpenOffice.org
Java(software platform)
Which of the following statement(s) is/are true?
JAXB 1.0 enabled on-demand validation on a JAXB content tree.
JAXB 1.0 provided validation at unmarshal time
JAXB 2.0 allows validation at unmarshal and marshal time
All of the above
Which of the following cannot be used as a Web Service Client?
Direct Invocation Interface.
Dynamic Invocation interface
Application Client
Dynamic Proxy
Which of the following statement(s) is/are correct?:
With JAX-WS, the developer generates/parses SOAP messages
A JAX-WS client cannot access a web service that is not running on the Java platform, and vice versa
For a JAX-WS Endpoint: The implementing class should not explicitly reference an SEI through the endpointInterface element of the @WebService annotation
The starting point for developing a JAX-WS web service is a Java class annotated with the javax.jws.WebService annotation.
Which of the following statement(s) is/are false with respect to WSDL?:
The <types> element defines the data type that are used by the web service
The <binding> element defines the message format and protocol details for each port
The <types> element defines the data elements of an operation.
The <message> element defines the data elements of an operation
In WSDL a <portType> refers to:
Only the messages that are involved including their types and elements to be used
The actual protocol used in the Web Service
TCP/IP or UDP port on the server
The operations that can be performed, and the messages that are involved.
Only the operations that can be performed
Which of the following is not an UDDI datatype?:
BusinessTemplate.
BusinessEntity
BusinessService
TModel
BindingTemplate
Which of the following statement(s) is/are false with respect to SOAP 1.2.?:
SOAPAction HTTP header is optional in SOAP 1.2
SOAPAction HTTP header is mandatory in SOAP 1.2.
SOAP 1.2 disallows partially transmitted and sparse arrays
SOAP 1.2 adds a new standard header for reporting additional information in "MustUnderstand" faults
The primary goal of this Web Service Design pattern is to move business logic out of the service implementation class and into distinct business objects that are more easily managed and evolved over time.:
Asynchronous Query Pattern
Router Pattern
Message Bus Pattern
None of the above
Command Façade Pattern.
{"name":"JAVA 51 - 100", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge on RESTful web services with this engaging quiz designed for developers, students, and enthusiasts alike. Dive into various aspects of REST architecture, HTTP methods, and JAX-RS annotations.Featuring:50 multiple choice questionsCovers fundamental and advanced topicsPerfect for self-assessment and learning","img":"https:/images/course4.png"}