Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Web services


Published on

This slides describes the understanding of web services fundamentals.types of web services and how to implement in java.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Web services

  1. 1. Web Services By Uma
  2. 2. SOA – Service Oriented Architecture
  3. 3. What is Web Service?  Web services are client and server applications that communicate over the World Wide Web’s (WWW) HyperText Transfer Protocol (HTTP).  A way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone.  Web services can be combined in a loosely coupled way to achieve complex operations.  Programs providing simple services can interact with each other to deliver sophisticated added-value services.
  4. 4. Uses of Web Services Reusable Application Components Connect Existing Software
  5. 5. Free Web Services Site
  6. 6. REST WSDL WADL Categories of Web Services
  7. 7. SOAP Architecture
  8. 8. SOAP Simple Object Access Protocol (SOAP) is a standard protocol specification for message exchange based on XML. Communication between the web service and client happens using XML messages. SOAP defines the rules for communication like what are all the tags that should be used in XML and their meaning.
  9. 9. Apache CXF  Open Source Services Framework  Build and develop services using frontend programming APIs, like JAX-WS and JAX-RS.  This Services run on different protocols SOAP, XML/HTTP, RESTful HTTP, or CORBA  Work on different transports HTTP, JMS or JBI.
  10. 10. What is WSDL? WSDL stands for Web Services Description Language. WSDL is a language for describing web services and how to access them. WSDL is written in XML. WSDL definition describes how to access a web service and what operations it will perform.
  11. 11. WSDL Elements Types– a container for data type definitions using some type system (such as XSD). Message– an abstract, typed definition of the data being communicated. Operation– an abstract description of an action supported by the service. Port Type–an abstract set of operations supported by one or more endpoints. Binding– a concrete protocol and data format specification for a particular port type. Port– a single endpoint defined as a combination of a binding and a network address. Service– a collection of related endpoints.
  12. 12. How to implement SOAP Web service? Interfaces & its Implementations @WebService public interface ServiceName { public String serviceMethod1(); public int serviceMethod2(args); } @WebService(endpointInterface = " *.Service") public class ServiceImpl implements Service{ @Override public String serviceMethod1() {…....} @Override Public int serviceMethod2(args){.......} }
  13. 13. Rest Architecture
  14. 14. REST  REST is a client-server architecture which (among other things) leverages the full capacity of the HTTP protocol.  RESTful webservices use HTTP methods explicitly by mapping the REST operations to HTTP methods: Create - POST Retrieve - GET Update - PUT Delete - DELETE
  15. 15. WADL The Web Application Description Language (WADL) is a machine-readable XML description of HTTP-based web applications (typically REST web services). WADL models the resources provided by a service and the relationships between them.  WADL is intended to simplify the reuse of web services that are based on the existing HTTP architecture of the Web.
  16. 16. Implementation of REST Web service Service Beans(Class as a Resource) @Path(“rest”) Class Resource { @GET @Produces("text/plain") Public String method1() {….....} @GET @Consumes("application/json") Public Response method2 () { …....} }
  17. 17. THANK YOU