Computer Knowledge

Java Enterprise and Web Technologies

2,279 Questions

Java enterprise and web technologies questions focus on J2EE architecture, web services like SOAP, and servlet functionalities. These topics frequently appear in IT officer and specialist scale examinations. Regular practice ensures familiarity with enterprise application components.

HttpServlet methodsSOAP and web servicesEJB architecture rolesJ2EE componentsJSP servlet callingUDDI concepts

Java Enterprise and Web Technologies Questions

Multiple choice technology programming languages
  1. Client

  2. Server

  3. MustUnderstand

  4. VersionMismatch

  5. HeaderError

  6. InvalidHeader

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

SOAP uses the 'Client' fault code when the message is malformed or contains invalid information from the client side. Since the header data itself was invalid, this is a client-side error, not a server processing issue.

Multiple choice technology programming languages
  1. The developer must use an EJB-based endpoint.

  2. The developer must use a procedure-style Web service.

  3. The developer must use a document-style Web service.

  4. The developer can use a procedure-style or document-style Web service.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Both procedure-style (RPC) and document-style web services can handle multiple input parameters (SSN, name, DOB) and return different document types. Neither EJB nor a specific style is mandatory for this requirement.

Multiple choice technology programming languages
  1. It defines the Web services as a resource.

  2. It defines a stateful behavior for the participating Web services.

  3. It provides a location where services can be dynamically discovered.

  4. It defines a stateless behavior for the participating Web services.

  5. It decouples the Web service from its implementation.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

UDDI (Universal Description, Discovery, and Integration) provides a registry where web services can be published and dynamically discovered by other applications. This enables suppliers to find available services without prior knowledge.

Multiple choice technology web technology
  1. data to be exchanged between various applications and different platforms

  2. resolving interoperability issues

  3. applications to function between two different operating systems or servers

  4. All of the above

  5. Only B and C

  6. Only A and B

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Web services enable all three capabilities: exchanging data between diverse applications and platforms (A), resolving interoperability problems between different systems (B), and allowing applications to work across different operating systems or servers (C). This cross-platform integration is the core purpose of web services.

Multiple choice technology web technology
  1. SOAP platform and language independent, allows to get around firewalls

  2. SOAP is based on HTML

  3. SOAP is designed to communicate through LAN

  4. All of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

SOAP is widely used because it runs over HTTP/HTTPS, enabling it to bypass standard firewalls easily. It is also language and platform independent. Distractors claiming SOAP is based on HTML or designed only for LANs are false; SOAP relies on XML.

Multiple choice technology web technology
  1. Can be used to generate server side and client side Java (Web Service) code from a WSDL

  2. Can be used to generate a WSDL from Java (Web Service) code

  3. Both A and B

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

JAX-RPC supports both directions of code generation: from WSDL to Java (generating server/client stubs from a service description) and from Java to WSDL (generating service description from Java code). This bidirectional support makes it flexible for different development workflows.

Multiple choice technology web technology
  1. A standard way of integrating web-based applications

  2. One type of service that can be part of a Service Oriented Architecture

  3. Programmable XML-based service

  4. Only B and C

  5. Only A and B

  6. A, B and C

Reveal answer Fill a bubble to check yourself
F Correct answer
Explanation

A web service is all three: a standard way of integrating web-based applications using XML-based protocols (A), a key component of Service Oriented Architecture (B), and a programmable service accessible over the web (C). These definitions capture the technical, architectural, and functional aspects of web services.

Multiple choice technology web technology
  1. To read and write to-from a UDDI registry using SOAP messages

  2. To read and write to-from an ebXML registry using SOAP messages

  3. Both A and B

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

JAX-R provides a uniform, standard Java API for accessing different kinds of XML registries, specifically supporting both the UDDI (Universal Description, Discovery, and Integration) registry standards and the ebXML (Electronic Business XML) Registry standards using SOAP.

Multiple choice technology web technology
  1. java:RPC, java:EJB

  2. java:WSDL, java:UDDI

  3. java:eb-xml, java:SOAP

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Java web services (particularly with Apache Axis), the valid pivot-handlers are java:RPC (for RPC-style services) and java:EJB (for EJB-based services). WSDL and UDDI are not handler types, and eb-xml is a different specification. Pivot handlers determine how the service endpoint is implemented.

Multiple choice technology web technology
  1. Apache ANT

  2. Apache Tomcat

  3. Jakarta Struts

  4. Apache Axis

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To solve this question, the user needs to have knowledge about SOAP, web services, and open-source technologies.

SOAP (Simple Object Access Protocol) is a messaging protocol that allows for the exchange of structured information between different application systems. SOAP is based on XML and is typically used in web services to enable communication between different applications.

Open-source software is software with source code that is available to the public, allowing anyone to use, modify, or distribute the software.

Now, let's go through each option and explain why it is right or wrong:

A. Apache ANT - Apache ANT is a Java-based build tool used for compiling and building software. It is not a SOAP server or client, so this option is incorrect.

B. Apache Tomcat - Apache Tomcat is a web server and servlet container used for hosting Java-based web applications. It is not a SOAP server or client, so this option is incorrect.

C. Jakarta Struts - Jakarta Struts is a framework for building web applications in Java. It is not a SOAP server or client, so this option is incorrect.

D. Apache Axis - Apache Axis is an open-source SOAP server and client framework for building web services in Java. It supports both the SOAP 1.1 and SOAP 1.2 specifications and provides a range of tools and APIs for working with SOAP-based web services. Therefore, the correct answer is:

The Answer is: D. Apache Axis

Multiple choice technology web technology
  1. SOAP, UDDI, XML

  2. HTTP, WSDL

  3. UDDI, XML, SOAP,XML-RPC

  4. SOAP, UDDI, WSDL

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The core web service platform elements are SOAP (messaging protocol for XML communication), UDDI (registry for service discovery), and WSDL (describes service interface). While HTTP is the transport and XML-RPC is a protocol, the three key platform elements that define the web services stack are SOAP, UDDI, and WSDL.

Multiple choice technology web technology
  1. That can be used to generate Java classes from an XML schema

  2. Can be used to read and write XML using Java classes generated from an XML schema

  3. Is used for parsing XML using SAX and DOM

  4. Both A and B

  5. Both B and C

  6. Both A and C

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

JAX-B provides a two-way binding between XML and Java objects. It can generate Java classes from an XML schema (option A), and then use those classes to read and write XML documents (option B). SAX and DOM (option C) are separate parsing APIs, not part of JAX-B.

Multiple choice technology programming languages
  1. Application runs without any change

  2. Application automatically close

  3. Application automatically restart

  4. Cannot change the web.config file at run time

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In ASP.NET, web.config is a monitored file. Any modification triggers an application domain restart and recompilation. This ensures configuration changes take effect but causes temporary unavailability. The application doesn't close permanently - it restarts automatically. Changes at runtime are possible but disruptive.

Multiple choice technology web technology
  1. architectural independent

  2. language independent

  3. based on http

  4. none of the above

Reveal answer Fill a bubble to check yourself
A,B Correct answer
Explanation

SOAP's design separates specification from implementation, enabling architectural independence - any system can implement SOAP regardless of underlying architecture. Language independence stems from XML-based messaging - any language can parse XML. SOAP is transport-agnostic and works over HTTP, TCP, SMTP, etc., so being HTTP-based isn't an advantage.

Multiple choice technology web technology
  1. SOAP,UDDI,WSDL

  2. XML,XSD,WSDL

  3. RPC,SOAP,http

  4. all the above

  5. first and second

  6. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Web services platform core elements are SOAP for messaging, UDDI for service discovery and registry, and WSDL for service description. These three form the foundation - XML and XSD are underlying technologies, RPC is an older paradigm, and HTTP is a transport protocol. SOAP, UDDI, WSDL together provide complete web service functionality.