Thursday, March 21, 2019

Web services Interview Questions

Web Services Interview Questions.
This blog is just for revision.
  • What is SOAP Web Services
SOAP ( simple object access protocol) based web services (application exchange information over network)  .
  • What is Contract first ?
WSDL or XSD is created first , then the java classes .

  • What is WSDL ?
WS Description Language , it describes a web service .
  • What are the parts of wsdl ?
  1. types : data types used 
  2. message : request and response
  3. portType : operations available
  4. binding : 
  5. Operations:
  6. Service :
Types
Schema
Contract namespace
Schema location xsd

Message can be multiple
Part
Name
Element
Type


Port type
Operation
Input, output,fault



Binding
Style document/ RPC transport
Operation
Input
Header, body
Output
Header,body
Fault
Fault


Service
Port
Binding
Location
  • What is XSD ?
It defines schema which defines structure of xml.


  • Explain wsdl2java

Use pluggin cfx-codegen-pluggin
Goal wsdl2java
Wsdl location
Binding files
Note : wsdl will have xsd,a java class for each xsd will be generated.



  • What are the elements of soap message?


  1. Envelope
  2. Header
  3. Body
  4. Fault


  •  What are SOLID principles in Rest Web services Development ?
  1. Single Responsibility : Each class has only one function 
  2. Open for Extension Closed for Modification : existing classes should not be modified , instead new classes should be created .
  3. Liskov Substitution Principle :  App should work fine if we substitute subclass in place of super class .
  4. Interface Segregation : large interfaces should be divided into smaller ones .
  5. Dependency Inversion : loose coupling .

No comments:

Post a Comment

ec2-user@ec2 Permission denied