Web Services Interview questions
Best Web Services Interview questions And Answers
Web service is a standardized way to integrate web-based applications using SOAP, XML, UDDI and WSDL open standards over an internet protocol backbone. After this, developers can add web services to GUI to offer specific functionality to users.
There are two types of web services:
- SOAP web services: SOAP or Simple Object Access Protocol is based on transferring XML data as SOAP messages.
- RESTful web services: Used to build web services that are maintainable, lightweight and scalable in nature.
- Simple to use
- Platform and language independent
- Firewall friendliness
- Use of open standards
- Universal interoperability
- Extremely versatile
- Highly flexible
- helps to create payload format and extensible protocol
- Extreme reliance on HTTP
- Considerably slow
- Serialization by value and not by reference
WSDL or Web Services Description Language is an XML format for describing network services as a set of endpoints operating on messages containing procedure-oriented or document-oriented information. It allows developers to exchange info over a particular protocol between applications.
Continue further to access best web services interview questions for experienced as well as freshers.
Web services require the following security:
- Username/Password approach
- X.509 approach: It identifies the user by a public key infrastructure
- Digital Signature: XML signature to be used to protect data
- Encryption: XML encryption to be used to protect data
Universal Description, Discovery, and Integration or also known as UDDI is an XML based standard used for describing, finding and publishing web services. It’s a specification for a distributed registry of web services and uses Web Service Definition Language (WSDL) to define interfaces of web services.
REpresentational State Transfer or REST web service is an architectural style for developing. It’s favorite due to its simplicity and fact that it builds upon existing features and systems of HTTP in order to achieve its objectives, as opposed to creating entirely new frameworks, technologies, and standards.
|1.||It stands for Simple Object Access Protocol||It stands for Representational State|
|2.||It was a protocol and designed with a specification.||It’s an Architectural style in which web services can be treated as a RESTful service.|
|3.||Can’t make use of REST||Can make use of SOAP|
|4.||It uses service interfaces to expose its functionality to applications||It uses Uniform Service locators to access to the components on the hardware device|
|S.no||JAX RPC||JAX WS|
|1.||Services based on JAX RPC uses the RPC programming model to invoke operations of a web service. RPC programming model invokes stubs located on the client to call methods on a remote server.||Services based on JAX WS uses annotations to declare the endpoints of web service. The annotations use the requirement of deployment descriptors|
This web services interview question and answer has always been the choice of the interviewers. We suggest you go through it multiple times.
The sun-jaxws.xml file is present in SOAP web services and helps in offering the endpoints details when JAX WS web services get deployed in a servlet container. Placed in WEB-INF directory, the sun-jaxws.xml file contains implementation class, endpoint name, meta information, and a URL pattern.
|1.||SOA or Service Oriented Architecture is an architectural concept focused on having different services communicating with each other to carry out a more significant function.||A web service is a fundamental building block present in a Service Oriented Architecture. When multiple functions get combined, an application is created under an SOA|
The above question can be a game-changing Web Service Interview Question for you. You just have to go through it one more time.