Advance Java Interview Questions | Eklavya Online

Advance Java Interview Questions

So, which approach will you choose

The best practice is to use “contract-first”, and here is the link that explains this much better with examples –>  contract-first versus contract-last web services In a nutshell, the contract-last is more fragile than the “contract-first”.You will have to decide what is most appropriate based on your requirements, tool sets you use, etc. Note: More …

So, which approach will you choose Read More »

What are the pros and cons of each approach, and which approach would you prefer

Contract-first Web service PROS: Clients are decoupled from the server, hence the implementation logic can be revised on the server without affecting the clients. Developers can work simultaneously on client and server side based on the contract both agreed on. You have full control over how the request and response messages are constructed — for …

What are the pros and cons of each approach, and which approach would you prefer Read More »

What are the different approaches to developing a SOAP based Web service

These two approaches The contract-first approach, where you define the contract first with XSD and WSDL and the generate the Java classes from the contract. The contract-last approach where you define the Java classes first and then generate the contract, which is the  WSDL file from the Java classes. Note: The WSDL describes all operations …

What are the different approaches to developing a SOAP based Web service Read More »

Web services when you can use traditional style middle-ware such as RPC, CORBA, RMI and DCOM

The traditional middle-wares tightly couple connections to the applications and it can break if you make any modification to your application. Tightly coupled applications are hard to maintain and less reusable. Generally do not support heterogeneity. Do not work across Internet. Can be more expensive and hard to use. Web Services support loosely coupled connections. …

Web services when you can use traditional style middle-ware such as RPC, CORBA, RMI and DCOM Read More »

What is the difference between SOA and a Web service

SOA is a software design principle and an architectural pattern for implementing loosely coupled, reusable and coarse grained services. You can implement SOA using any protocols such as HTTP, HTTPS, JMS, SMTP, RMI, IIOP (i.e. EJB uses IIOP), RPC etc. Messages can be in XML or Data Transfer Objects (DTOs). Web service is an implementation …

What is the difference between SOA and a Web service Read More »

How would you decide what style of Web Service to use? SOAP WS or REST

In general, a REST based Web service is preferred due to its simplicity, performance, scalability, and support for multiple data formats. SOAP is favored where service requires comprehensive support for security and transactionalreliability. The answer really depends on the functional and non-functional requirements. Asking the questions listed below will help you choose. Does the service …

How would you decide what style of Web Service to use? SOAP WS or REST Read More »

What are the differences between both SOAP WS and RESTful WS

The SOAP WS supports both remote procedure call (i.e. RPC) and message oriented middle-ware (MOM) integration styles. The Restful Web Service supports only RPC integration style. The SOAP WS is transport protocol neutral. Supports multiple protocols like HTTP(S), Messaging, TCP, UDP SMTP, etc. The REST is transport protocol specific. Supports only HTTP or HTTPS protocols. …

What are the differences between both SOAP WS and RESTful WS Read More »