Tuesday, March 22, 2016

what are Web Services? Types of Web Services

What are Web Services?

Web Services are client and Server application that 
communicate over World Wide Web (WWW)and
Hyper Text Transport Protocol(HTTP).Web Services
provides a standard  means of inter-operating between
software applications running on different platforms 
and frameworks.Web Services are can be combined
in a loosely coupled way to achieve complex operations.


Types of Web Services 
Web Services can be implemented in various ways. The two types of Web Services are discussed in this article they are "Big" web services and "Restful"Web Services.

Big Web Services
In Java EE 6, JAX-WS provides the functionality for "Big" Web Services. This Web Service use XML messages that fallow the Simple Object Access Protocol(SOAP), an XML Language defining a message architecture and message format.

The SOAP message format and the WSDL interface definition Language have gained widespread adaption. Many development tools such as NetBeans IDE,can reduce the complexity of developing web services applications.

A SOAP based Design  must include the fallowing statements:


  • WSDL(Web Service Definition Language) can be used to describe the details of contract,which may include messages,operations,bindings and the location of the web services. You may also process SOAP messages in a JAX-WS without publishing WSDL.
  • Many web services specifications address such as requirements and establish a common vocabulary for them.Examples include transactions,security,addressing,trust,coordination and etc..
  • The architecture needs to handle an asynchronous processing and invocation.

Restful Web Services
 In Java EE 6, JAX-RS provides the functionality for Representational State Transfer (RESTful)  web services. REST is well suited for basic, ad hoc integration scenarios. RESTful web services,often better integrated with HTTP than SOAP-based services are, do not require XML messages or WSDL service–API definitions.developing RESTful web services is inexpensive and thus has a very low barrier for adoption. You can use a development tool such as NetBeans IDE to further reduce the complexity of developing RESTful web services.

A RESTful design may be appropriate when the following conditions are met.


  • The web services are completely stateless. A good test is to consider whether the interaction  can survive a restart of the server.

    • A caching infrastructure can be leveraged for performance. If the data that the web service returns is not dynamically generated and can be cached, the caching infrastructure that web servers and other intermediaries inherently provide can be leveraged to improve performance.However, the developer must take care because such caches are limited to the  HTTP GET method for most servers.
    • Web service delivery or aggregation into existing web sites can be enabled easily with a RESTful style.Developers can use such technologies as JAX-RS and Asynchronous JavaScript with XML (AJAX) and such toolkits as Direct Web Remoting (DWR) to consume the services in their web applications. Rather than starting from scratch, services can be exposed with XML and consumed by HTML pages without significantly refactoring the existing web site architecture. Existing developers will be more productive because they are adding to something they are already familiar with rather than having to start from scratch with new technology.

    Decides which type of Web Services to Use:

    Basically, you would want to use RESTful web services for integration over the web and use big web services in enterprise application integration scenarios that have advanced quality of service (QoS) requirements.

    1.  JAX-WS: addresses advancedQoS requirements commonly occurring in enterprise
    computing. When compared to JAX-RS, JAX-WS makes it easier to support the WS-* set of
    protocols, which provide standards for security and reliability, among other things, and
    interoperate with other WS-* conforming clients and servers.

    2. JAX-RS: makes it easier to write web applications that apply some or all of the constraints of the REST style to induce desirable properties in the application, such as loose coupling
    (evolving the server is easier without breaking existing clients), scalability (start small and
    grow), and architectural simplicity (use off-the-shelf components, such as proxies or HTTP
    routers). You would choose to use JAX-RS for your web application because it is easier for
    many types of clients to consume RESTful web services while enabling the server side to
    evolve and scale. Clients can choose to consume some or all aspects of the service and mash
    it up with other web-based services.

    ALSO READ:  SOA Architecture




    No comments:

    Post a Comment

    High Paying Jobs after Learning Python

    Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...