Wednesday, March 9, 2011

Webservices Qs

Q) Why are webservices needed?

Interoperatability

Q) Distinguish the type of Webservices?

SOAP Based and Restful.

a) SOAP Webservices:

Practically only two types of SOAP based webservices are used .. RPC Encoded and Document Literal.

RPC: Information is sent in the form of the method calls and the parameters

Document Literal: Information is sent in the form of an actual xml document which can be validated against
xml schema at the other end.

b) Representational state transfer (REST):

GET,POST,PUT,DELETE

Q) What are the two approaches to create a webservice?

Top Down: From WSDL one generates the Java Classes

Bottom Up: From Java classes one generates the WSDL

Q) Few tools used in your project if you used webservices.

SOAP UI: Test the web service

Some times some of the back end services might not available , so you can create a mock response and run the webservice service from the soap ui. Then your program should hit the mock response and you can check the functionality.

Stylus Studio: Create the XML Schema and generate the binding classes.

Axis2: Create the web service

Q) Explain the use of Castor?
Castor is used to create the binding classes from the schema
XML over HTTP

Q) What is the use of WS Policy?

Applied in the Web services model, policy is used to convey conditions on an interaction between two Web service endpoints.

condition like:

1) security token shud be atleast once or is required so on..

Q) What is JAX - RS?

JAX-RS: Java API for RESTful Web Services is a Java API that provides support in creating web services according to the Representational State Transfer (REST) architectural style. JAX-RS uses annotations.

No comments: