Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Spring-WS support contract last development approach. Yes, or no?

Answer»

No, Spring-WS does not SUPPORT the contract's LAST development APPROACH. It only supports the contract-first development approach.

2.

Explain Spring Web Service.

Answer»

Spring WS (Web SERVICE) is basically a product of the spring community whose main focus is to develop document-driven web SERVICES. It only AIMS to facilitate contract-first SOAP service DEVELOPMENT. It allows the development of web services that are FLEXIBLE.

3.

Name the web service method that is read-only, and is idempotent?

Answer»

The web service method that is read-only and SAFE is the GET method, and the web service methods that are IDEMPOTENT are PUT and DELETE operations. Idempotent REFERS to the operations whose results will always be the same even if these operations are INVOKED so many times.  

4.

What is JAXB? Name three different packages in JAXB binding framework.

Answer»

JAXB (Java ARCHITECTURE for XML Binding) is basically a Java STANDARD that is used to define how Java OBJECTS get converted into XML and vice-versa. Using Java facilitates the reading and writing of XML. It MAKES it easier to access XML documents from applications that are written in the Java programming language. There are three different packages in JAXB binding framework that INCLUDES

  • xml.bind 
  • xml.bind.util 
  • xml.bind.helper 
5.

Explain the term JAXP.

Answer»

JAXP (Java API for XML Processing) is BASICALLY a Java API that allows parsing, transform, validate, and queries XML files with DOM (Document Object Model), SAX (Simple API for XML), or StAX (Streaming API for XML) Parsers/Parsing INTERFACES. It is used for processing XML data using applications that are WRITTEN in Java programming LANGUAGE.  

6.

What is the importance of using @XmlRootElement?

Answer»

The main purpose of @XmlRootElement is to TRANSFORM or convert Java OBJECTS to XML and vice versa. It is generally the base common annotation USED for JAXB API. It uniquely associates a root element with a CLASS.  

7.

How to implement web services in .NET?

Answer»

HTTP Handles are generally used to IMPLEMENT WEB services in .NET because HTTP handles interrupt REQUESTS to .asmx FILES

8.

What are .NET Web services and .NET Remoting? Write the difference between them.

Answer»

.NET Remoting: It is a method that enables objects to communicate or interact with each other across application DOMAINS, processes, and machine boundaries, whether application components are present in one computer or different computers across the entire world. 

.NET Web service: It is a method that enables cross-platform integration by USING XML, HTTP, and SOAP for communication among two devices over WWW. It simply shares BUSINESS logic, processes, and data through programmatic interfaces across a network.

Both of them are powerful TECHNOLOGIES that provide SUITABLE frameworks and thus support the development of distributed technologies and application integration. There is some difference between these two technologies as given below. 

Web Services.NET Remoting
It uses HTTP protocol. It uses TCP/HTTP/SMTP protocol. 
Its performance is slow as compared to .NET Remoting. It provides faster communication and performance when one uses the TCP channel and the binary formatter. 
These services are hosted using IIS and therefore, are more reliable. It is less reliable as compared to .NET Web services. 
It supports the XML Schema type system and provides a very simple programming model along with broad cross-platform reach.It supports a runtime type system and provides a complex programming model along with very limited reach. 
9.

What’s the difference between Web services and CORBA or DCOM?

Answer»
WEB serviceCORBA and DCOM 
Web services BASICALLY transfer MESSAGES to applications or receive messages from applications using the HTTP protocol. To encode data, a web service uses XML. They basically transfer messages to applications or receive messages from applications using non-standard PROTOCOLS like RPC, IIOP (Inter Internet Object Protocol), etc.
WSDL is USED to define web services.CORBA Interface Description Language is used to define CORBA components and Microsoft Interface Definition Language is used to define DCOM components.
UDDI is used to discover web services.CORBA registry is used to define CORBA components and DCOM registry is used to define DCOM components. 
They are firewalls friendly.CORBA uses IIOP protocol i.e., non-internet friendly. 
10.

What's the importance of security in web services?

Answer»

Security is considered a very important feature in any WEB application. It is essential in web SERVICES so that we can make confidential or sensitive INFORMATION and transactions more reliable. In web services, the security is attained through SSL (Service Socket Layer) that helps in developing EST (Entrust Secure Transaction) platform.

11.

What is the importance of URI in REST based web services?

Answer»

In REST-based WEB services, URI (UNIFORM Resource Locator) is generally used to locate resources on the server that is HOSTING the web service. Each resource in service will have at least one URI that is used to identify it. Web services CLIENTS generally USE URI to access the resource. Its format is given below: 

<protocol>://<service-name>/<ResourceType>/<ResourceID>

 

12.

Give an example of working for a Web Service Provider.

Answer»

using System; using System.Web.Services; using System.Xml.Serialization; [WebService(NAMESPACE="http://localhost/MyWebServices/")] public CLASS FirstService : WebService { [WebMethod] public int ADD(int a, int b) { return a + b; } [WebMethod] public String SAYHELLO() { return "Hello WORLD"; } }

13.

What is BEEP?

Answer»

BEEP (Blocks Extensible Exchange Protocol) is basically an IETF (INTERNET Engineering Task Force) framework that is generally USED to develop network application protocols. One can create these new protocols for different applications such as INSTANT messaging, network management, file transfer, content syndication, etc. It is directly layered over TCP. BEEP has various in-build features such as AUTHENTICATION, security, initial handshake protocol, error handling, etc. 

14.

What do you mean by sun-jaxws.xml file?

Answer»

Sun-jaxws.xml file is simply used to provide endpoint details when JAX-WS web services are deployed as a STANDARD WAR archive on a servlet container like Tomcat. It is ALSO available in the WEB-INF directory. 

Example: 

&LT;?xml version="1.0" ENCODING="UTF-8"?> <endpoints XMLNS="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0"> <endpoint name="HelloWorldWS" implementation="org.arpit.javapostsforlearning.webservice.HelloWorldImpl" url-pattern="/HelloWorldWS"/> </endpoints>
15.

Is there any need for a special application to have access to the Web service?

Answer»

No, there is no need for a special APPLICATION to have access to the WEB service. One can access web applications from any of the applications that SUPPORT XML-based OBJECT requests and responses. 

16.

Name two Microsoft solutions for distributed applications.

Answer»

The TWO Microsoft solutions for distributed APPLICATIONS INCLUDE:

  • .NET WEB Services 
  • .NET Remoting
17.

Name some important annotations of JAX-RS API.

Answer»

Some important annotations of the JAX-RS API include: 

  • @Path: It is specially used to specify the relative path of resource class and methods. This annotation can be used on any class or method in code. It binds the URI pattern to a JAVA method.
  • @GET, @PUT, @POST, @DELETE, @HEAD: It is specially used to specify HTTP request type for a method. These annotations can be specified on the JAX-RS method.
  • @Produces: This annotation is specially used to specify HTTP responses generated by WEB SERVICES.
  • @Consumes: This annotation is specially used to specify HTTP Requests.  
  • @PathParam: It is specially used to specify parameters to path value by PARSING.  
18.

What do you mean by JAX-RS API? Write some implementations of JAX-RS API.

Answer»

JAX-RS (Java API for RESTFUL web services) is basically an ESSENTIAL part of the Java EE platform that is being USED for developing or building RESTful web services. There are basically two important implementations of JAX-RS API: 

19.

Name some important annotations of JAX-WS.

Answer»

Some IMPORTANT ANNOTATIONS of JAX-WS INCLUDE

  • @WEBSERVICE 
  • @WebMethod 
  • @SOAPBinding 
  • @WebResult 
  • @WebServiceClient
20.

What do you mean by JAX-WS API? Write some implementations of JAX-WS API.

Answer»

JAX-WS (JAVA API for SOAP Web Services) is basically an essential part of the Java EE platform that is being used for developing or BUILDING SOAP web services and clients that communicate using XML. It enables DEVELOPERS to write message-oriented and RPC-oriented web services. There are basically two important implementations of JAX-WS: 

RPC Style: It generates WSDL documents on the basis of the method name and its parameters. There are no type definitions present in the WSDL document.

Document Style: In this, one can TRANSPORT XML messages as a part of SOAP requests unlike in RPC-style web service.  

21.

What do you mean by Java Web services? Name the methods to create web services.

Answer»

Java web services is BASICALLY a type of web service that is being designed to develop and deploy basic web service on the Java platform. Java web service applications perform communication through WSDL and these applications can be accessed by different programming languages including .Net, PHP, etc. Two ways to WRITE java web application code INCLUDE SOAP and RESTful. 

22.

What do you mean by EIS and EPS?

Answer»

EIS (Entrust Identification Service): It is basically GENERATED from Entrust security platform which allows or enables the corporates simply to handle and control the identities that are trusted to PERFORM transactions for web service transactions.  

EPS (Entrust Privacy Service): It deals with security and confidentiality simply by ENCRYPTING data. It is done to make sure that only concerned parties or authorized ONES can have ACCESS to data. 

23.

What is an Entrust Entitlement Service?

Answer»

EES (Entrust ENTITLEMENT Service), generally refers to a service that verifies ENTITIES that ATTEMPT to access a web service. 

24.

Explain wsimport?

Answer»

Wsimport is basically a command-line tool that processes an existing WSDL file to generate all required WEB SERVICE artifacts for a web service client to access the published web SERVICES. It also supports a top-down approach for developing JAX-WS web services. In simple words, it generates Java CLASSES from WSDL. 

25.

What do you mean by DISCO?

Answer»

DISCO (DISCOVERY), as the name suggests, is a Microsoft technology that is being used to discover WEB services. It is the PROCESS of locating and interrogating web service descriptions which is a preliminary step for having access to web services over the Internet.  The organization that provides web services generally provides a DISCO file on its server that includes the links of all the AVAILABLE web services so that it can be used within the local network. 

26.

Explain the term Distributed Technologies.

Answer»

Distributed technologies are in high demand NOWADAYS because of the increasing ratio of distributed applications. It simply enables segmenting of APPLICATION units and transferring these units to various COMPUTERS on different networks. 

27.

Why is Web service important?

Answer»

Web services are very important as they provide standardized web protocols I.e., HTTP or HTTPS SIMPLY to interoperate, COMMUNICATE, and exchange information in XML format VIA the internet. Some of its advantages include:  

  • Allows devices to talk to each other and share data or services between themselves. 
  • Makes the application platform and technology independent. 
  • Uses standardized standard protocol for communication.  
  • User SOAP over HTTP protocol so that one can use their low-cost internet for implementing web services. 
  • Allows business logic of different SYSTEMS to be available over the web. 
  • Can be used at the same time by many CLIENT applications.