July 28, 2017

Sreekanth B

Java Web Services Advanced Interview Questions and Answers

Explain each web service technologies - SOAP, WSDL, UDDI, eBXML and JAX pack?

SOAP: Simple Object Access Protocol(SOAP) is a protocol that is used to exchange structured information at the time of implementing a web service. SOAP is relied on XML. Message format of SOAP usually relies on another protocol of different application layers. Among these the most notable application layer is Remote Procedure Call(RPC) and HTTP. SOAP forms the foundation layer for web services protocol stack. This stack provides the basic framework for messaging on which the web services are built.

WSDL: Web Service Definition Language(WSDL) is used to describe a web service based on XML. WSDL is used for describing web services and to locate the services. WSDL consists of the information on what the service is all about, its residing location and the way of invocation the service.

UDDI: Universal Discovery Description Integration(UDDI) is used to publish and discover the information about the web services, UDDI is a specification. It is an XML based standard. This standard is used for describing, publishing, and finding the services. These services are found in a distributed environment through the use of a server called registry server.

Electronic Business using XML: EBXML is one form of XML family that is based on the standards of OASIS and UN/CEFACT. The mission of this standard is to provide an open xml-based infrastructure which could enable the global use of e-business in an interoperable, secure and consistent manner by all of the partners of trading. This is a unique architecture with unique concepts that are part theory and part implemented within the existing EBXML standards.

JAX PACK: A java API for xml pack that integrates all of the programming interfaces by SUN for different web services development. All these interfaces are made as a single download. JAX PACK is a bundle of JAXB,JAXM,JAX-RPC,and JAXR. Jax pack includes the documentations for support for the SAX,DOM.SOAP,WSDL,XSLT,EBXML,UDDI standards.

Explain the technologies included within JAX pack, i.e. JAXP, JAXB, JAXM, JAX-RPC, JAXR?

1. JAXP(Java API for XML Processing) :

- It provides the validation capability and parsing XML documents. There are three basic parsing interfaces in JAXP are DOM, SAX and Straming API for XML STAX.

2. JAXB(Java Architecture for XML Binding) :

- The java classes are mapped to XML representations. The two main features of JAXB are the ability to marshal Java objects into XML and unmarshal XML back to Java objects.

3. JAXM(Java API for XML Messaging) :

- It enables distributed software applications to communicate using XML (and SOAP). JAXM supports both asynchronous and synchronous messaging.

4. JAX-RPC(Java API for XML based RPC) :

- It allows a java based web service that is to be invoked by a java application provided the description, still being consistent with WSDL description. This can resemble as Java RMI over web services.

- Allowing a web service to be implemented at server side as a servlet/jsp or EJB container is the advantage of JAX-RPC.

Explain the web services architecture?

- The operations between different software applications, which are running on a variety of platforms and frameworks are supported by a standard called Web services. The web services architecture provides the concepts, model and understanding the web services and relationships among the components.

- The WSA specifies the minimal characteristics that are very common for all web services and a number of characteristics to the needed web services. WSA is called interoperability architecture that means the global elements of a global web service network are identified by this architecture in order to perform the interoperability between the web services.

What are smart web services?

- A smart web service understands the situational context and capable of sharing the context with other services. The result of this web service is based on the needs like who, what, when, where it was called.

- The customer’s identity, role of a customer, security policies, physical location of a customer, type of client device are some of the number of the situational circumstances of that a smart web service is aware of.

What is Web Services?

- Web services are the components that provide functionality via internet, uses standard protocol such as HTTP. Web services use SOAP to expose functionality which is an XML-based protocol that enables 2 disparate components to communicate. So web services hosted on windows platform can easily be consumed Linux and UNIX platform.

What is SOAP?

- SOAP stands for Simple Object Access Protocol.
- SOAP is an XML-based protocol that enables two components to communicate each other.
- It has the rules to translate platform specific data into the XML format.
- Web services are based on SOAP protocol in order to expose their functionality to disparate application and platform.

Advantages of SOAP:

- It defines its own security which is known as Web Service Security.
- It can be written in any programming language and executed on any platform.

Disadvantages of SOAP:

- It consumes more bandwidth and resource.
- It is slow.
- It does not have any other mechanism to discover the service.

Explain JAXR.

- JAXR stands for Java API for Registries.

- It provides a convenient way for Java developers.

- JAXR is a standard API that is used to access XML registries (list of services available on the web) from the JAVA platform.

- A client application can use JAXR API to query the registries.

- It acts as a pluggable layer that allows access to registries implemented on different standards such as UDDI.

- It enables Java software programmers to use a single, easy to use abstraction API to access a variety of XML registries.

It provides two main packages:

1. javax.xml.registry : It consists of the API interfaces and classes.
2. javax.xml.registry.infomodel : It consists of interfaces that define the information model for JAXR.

- It gives a uniform way to use business registries which is based on open standards.

Explain JAX-RPC?

- JAX-RPC uses SOAP to call remote procedures.
- It enables JAX-RPC clients to invoke web services developed across heterogeneous platform.
- It is an Application Program Interface(API).
- It is easier for the web services to call other applications.
- It provides a programming model for the development of SOAP.

What are Web Services?

- Web services exposes functionality over internet using protocol such as HTTP. Web services can be accessed by two disparate applications from different platforms as they use SOAP protocol to expose the business functionality. SOAP is a platform independent protocol, so the consumer of the web services doesn’t have to know any implementation detail of web services based components. This is the reason why web services hosted on windows can even be accessed by LINUX consumer.

Define UDDI, DISCO and WSDL?

UDDI(Universal Description, Discovery and Integration):

- It is the directory that is used to publish and discover public web services.


- Commonly known as Discovery. Discovery clubs together common services and exposes schema document of the web services.

WSDL(Web Service description language):

- This is used to describe web services. The description includes URL of web services.
Method and properties supported by web services. It supports data type. It supports protocol detail.

Explain JAXM messaging models?

- JAXM messaging models has two types of messaging model, synchronous and asynchronous.

1. Synchronous messaging model:

- In this type of model, client directly interacts with the source. The client sends a request and waits for the response.

2. Asynchronous messaging model:

- In this model, client sends message to the messaging provider and returns back. Messaging provider then performs the routing of message to the end source.

Subscribe to get more Posts :