Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Jsosa
J
Jsosa
Community Contributor
Quizzes Created: 1 | Total Attempts: 3,906
| Attempts: 3,906 | Questions: 20
Please wait...
Question 1 / 20
0 %
0/100
Score 0/100
1. What is difference between top-down and bottom-up approach of developing web services?

Explanation

The correct answer is both a and b. In the top-down approach, the first step is to create the WSDL (Web Services Description Language) document, which defines the structure and functionality of the web service. After that, Java classes are generated based on the WSDL document. On the other hand, in the bottom-up approach, Java code is written first to implement the desired functionality of the web service. Then, WSDL fields are automatically generated based on the implemented code. Both approaches have their advantages and disadvantages, and the choice between them depends on the specific requirements and constraints of the project.

Submit
Please wait...
About This Quiz
Java Quizzes & Trivia

This quiz was created by TeoGol29.
Remember, concepts are what really matter.

Personalize your quiz and earn a certificate with your name on it!
2. Web Services enables...

Explanation

Web services enable data to be exchanged between various applications and different platforms, allowing for interoperability between systems. This means that applications can function between two different operating systems servers. Therefore, the correct answer is "All of the above".

Submit
3. EclipseLink, TopLink, and Hybernarte are implementations of:

Explanation

EclipseLink, TopLink, and Hibernate are all implementations of JPA (Java Persistence API). JPA is a specification that defines a standard way to map Java objects to relational databases, allowing developers to interact with databases using object-oriented approaches rather than writing SQL queries. These implementations provide the necessary tools and libraries to work with JPA and handle the persistence of Java objects in a database.

Submit
4. Difference between RESTfull web services and SOAP web services

Explanation

The correct answer is "All of the above." This is because all three statements are true and highlight the key differences between RESTful web services and SOAP web services. REST is indeed simpler and easier to use compared to SOAP. REST utilizes the HTTP protocol for producing or consuming web services, while SOAP relies on XML. Additionally, REST is considered lightweight in comparison to SOAP.

Submit
5. What is the impact of marking an attribute in a JPA Entity class with @Transient annotation?

Explanation

By marking an attribute in a JPA Entity class with the @Transient annotation, it indicates that the attribute should not be persisted by the EJB container. This means that the attribute will not be stored in the database when the entity is saved or updated. This can be useful when there are certain attributes that are not relevant to be stored in the database or when they are derived from other attributes and can be calculated on the fly.

Submit
6. Web Services are the amalgamation of:

Explanation

Web services are a combination of SOAP, UDDI, and WSDL. SOAP (Simple Object Access Protocol) is a messaging protocol used for exchanging structured information in web services. UDDI (Universal Description, Discovery, and Integration) is a directory service that allows businesses to publish and discover web services. WSDL (Web Services Description Language) is an XML-based language used to describe the interface and functionality of a web service. Together, these three technologies form the foundation of web services, enabling communication, discovery, and description of services over the internet.

Submit
7. Which of the following is used to describe web services?

Explanation

WSDL (Web Services Description Language) is used to describe web services. It is an XML-based language that provides a standardized way to describe the functionalities and operations of a web service. WSDL defines the endpoints, input/output parameters, message formats, and communication protocols for a web service, allowing clients to understand how to interact with the service.

Submit
8. In which life cycle state the JPA entity class is synchronized with the database?

Explanation

The JPA entity class is synchronized with the database in the "Managed" life cycle state. In this state, the entity is being managed by the persistence context, and any changes made to the entity will be automatically synchronized with the database when the transaction is committed.

Submit
9. What causes the entity manager to move an Entity instance from the detached to the managed state?

Explanation

When the merge() method of the entity manager is invoked on an Entity instance, it causes the entity manager to move the instance from the detached state to the managed state. This means that the entity instance becomes associated with the persistence context of the entity manager and any changes made to the instance will be tracked and synchronized with the database when the transaction is committed. The merge() method is typically used when you want to update an existing entity with new data from a detached instance.

Submit
10. In the web services world, the REST (REpresentational State Transfer) is:

Explanation

The REST (REpresentational State Transfer) is a software architectural paradigm. It is a design approach for building scalable and loosely coupled web services. RESTful systems use HTTP as the main communication protocol and follow a set of principles and constraints to enable interoperability and simplicity. This architectural style emphasizes stateless communication, resource-oriented design, and the use of standard HTTP methods (GET, POST, PUT, DELETE) for manipulating resources. It is widely used in modern web development for creating APIs that can be easily consumed by different clients.

Submit
11. Service Transport, XML MEssaging, Service Description and Service Discovery are four layers of:

Explanation

The four layers mentioned - Service Transport, XML Messaging, Service Description, and Service Discovery - are part of the Web service protocol stack. These layers work together to enable communication and interaction between different components of a Web service. The Service Transport layer handles the transportation of messages, the XML Messaging layer deals with the formatting and encoding of messages in XML, the Service Description layer provides information about the Web service, and the Service Discovery layer helps in discovering and locating available Web services. Together, these layers form the protocol stack that facilitates the functioning of Web services.

Submit
12. In accessing a web service through synchronous call,

Explanation

In accessing a web service through synchronous call, the application has to wait until execution is completed. This means that the application will make a call to the web service and then pause its execution until it receives a response from the service. Once the execution is completed, the application can continue to perform the needed task using the received response. This ensures that the application does not proceed with its task until it has obtained the necessary data from the web service.

Submit
13. Which method of the jpa entity manager would you use to force synchronizing the database with the entities of the persistence context?

Explanation

The flush method of the JPA entity manager is used to force synchronizing the database with the entities of the persistence context. It ensures that all pending changes to the entities are written to the database immediately. This is useful when you want to make sure that any changes made to the entities are persisted in the database before performing any further operations.

Submit
14. Which of the following statements about the fetch modes in Entity beans is FALSE?

Explanation

The default fetching mode for a field in an Entity bean annotated by @Basic is not LAZY.

Submit
15. In a RESTful web service, you would use the HTTP methods as verbs to invoke the CRUD action (create, read, update, and delete) Which of the following is true:

Explanation

In a RESTful web service, the HTTP methods are used as verbs to invoke the CRUD actions. The correct answer states that to read data, the HTTP GET method should be used, and to delete data, the HTTP DELETE method should be used. This aligns with the standard conventions of RESTful architecture, where GET is used for retrieving data and DELETE is used for removing data.

Submit
16. How to declare JPA Entity class?

Explanation

The correct answer is to annotate the class with @Entity, annotate the primary key attribute or its getter method with @Id, and define private attributes to map the table columns. This is the standard way to declare a JPA Entity class. The @Entity annotation marks the class as an entity that will be mapped to a database table. The @Id annotation is used to indicate the primary key attribute of the entity. Private attributes are used to map the columns of the table.

Submit
17. Which of the following is NOT a JPA entity manager method?

Explanation

The "Detach" method is not a JPA entity manager method. JPA entity manager provides methods like "Persist" to persist an entity, "Flush" to synchronize the changes to the database, "Contains" to check if an entity is managed, and "Find" to retrieve an entity by its primary key. However, "Detach" is not a valid JPA entity manager method.

Submit
18. Which method of the jpa entity manager would you use to force synchronizing the persistence context from the database?

Explanation

The refresh method of the JPA entity manager is used to force synchronizing the persistence context from the database. This method retrieves the latest state of an entity from the database and updates the corresponding entity object in the persistence context. It is useful when there is a need to reload the entity with the most up-to-date data from the database, discarding any changes made to the entity in the persistence context.

Submit
19. What is TRUE about the cascading and cascade mode attributes in Entity Beans?

Explanation

Cascade mode attributes can be used to specify the cascading behavior for association annotations in an entity bean, such as @OneToMany. This means that when certain operations are performed on the source entity, such as persisting, deleting, or refreshing, the same operations will be cascaded to the target entities of the relationship. In this case, the refresh cascade mode attribute specifically causes the target entities to be refreshed when the refresh operation is invoked on the source entity of the relationship.

Submit
20. When is it most appropriate to architect your enterprise java application using SOAP protocol web services over RESTful?

Explanation

SOAP protocol web services are most appropriate when the web service interface must be predefined in a concrete contract and when asynchronous invocation is required. SOAP allows for the definition of a strict interface between the client and server, ensuring that both parties understand the structure and format of the data being exchanged. This is useful when the application requires a predefined and standardized interface. Additionally, SOAP supports asynchronous invocation, allowing the client to send a request and continue with other tasks without waiting for a response. This is beneficial when the application needs to perform multiple tasks simultaneously or when there is a need for non-blocking communication.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 22, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 26, 2015
    Quiz Created by
    Jsosa
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is difference between top-down and bottom-up approach of developing web services?...
Web Services enables...
EclipseLink, TopLink, and Hybernarte are implementations of:...
Difference between RESTfull web services and SOAP web services...
What is the impact of marking an attribute in a JPA Entity class with @Transient annotation?...
Web Services are the amalgamation of:
Which of the following is used to describe web services?...
In which life cycle state the JPA entity class is synchronized with the database?...
What causes the entity manager to move an Entity instance from the detached to the managed state?...
In the web services world, the REST (REpresentational State Transfer) is:...
Service Transport, XML MEssaging, Service Description and Service Discovery are four layers of:...
In accessing a web service through synchronous call,...
Which method of the jpa entity manager would you use to force synchronizing the database with the entities of the persistence context?...
Which of the following statements about the fetch modes in Entity beans is FALSE?...
In a RESTful web service, you would use the HTTP methods as verbs to invoke the CRUD action (create, read, update, and delete) Which of the following is true:...
How to declare JPA Entity class?
Which of the following is NOT a JPA...
Which method of the jpa entity manager would you use to force synchronizing the persistence context from the database?...
What is TRUE about the cascading and cascade mode attributes in Entity Beans?...
When is it most appropriate to architect your enterprise java application using SOAP protocol web services over RESTful?...
Alert!

Advertisement