Showing posts with label Web services. Show all posts
Showing posts with label Web services. Show all posts

Saturday, March 7, 2015

Web services - Part2

Web services standards :

The following standards play key roles in Web services: Universal Description, Discovery and Integration (UDDI), Web Services Description Language (WSDL), SOAP, and eXtensible Markup Language (XML).

Universal Description, Discovery and Integration (UDDI) :
UDDI is a protocol for describing available Web services components.The specification defines a group of Web services and programmatic interfaces for publishing, retrieving, and managing information about services. (In true SOA fashion, a UDDI registry is itself composed of Web services!) UDDI builds upon several other established industry standards, including HTTP, XML, XML Schema (XSD), SOAP, and WSDL.
A UDDI registry contains categorized information about businesses and the services that they offer, and it associates those services with technical specificiations of the Web Service. These technical specifications are usually defined using WSDL.A Web Service consumer queries the UDDI registry to find the WSDL descriptions to determine how to use the Web Service.The UDDI Project operates a global public registry called the UDDI Business Registry. This registry is available to everyone at no charge (see http://www.uddi.org) ).Before you can publish your business entity and Web service to a public registry, you must first register your business entity with a UDDI registry.
Organizations can also set up a private registry to support the requirements of an enterprise or a private community.A private registry allows you to publish and test your internal applications in a secure, private environment.


Web Services Description Language (WSDL):
WSDL describes web services in XML format.Since XML is used so WSDL is plateform and language independant.
WSDL allows a service provider to specify the following characteristics of a Web service:


  • The name of the Web service and addressing information
  • The protocol and encoding style to be used when accessing the public operations of the Web service
  • The type information such as operations, parameters, and data types comprising the interface of the Web service
  • WSDL documents allow developers to expose their applications as network-accessible services on the Internet. Through UDDI and WSIL, other applications can discover WSDL documents and bind with them to execute transactions or perform other business processes.


WSDL specification(which is in XML) divided into six major elements - Definition, Types, Message, PortType, Service

Simple Object Access Protocol(SOAP):
SOAP is a protocol for initiating conversations with a UDDI service. SOAP makes object access simple by allowing applications to invoke object methods, or functions, residing on remote servers.
A SOAP application creates a request block in XML, supplying the data needed by the remote method as well as the location of the remote object itself.SOAP has

Other frameworks existed which provided SOAP like functionalitiy e.g. CORBA, DCOM and Java RMI. Since SOAP is written entirely in XML so it is platform and language independent unlike other frameworks.

eXtensible Markup Language (XML) :
XML is an eXtensible Mark-up Language that enables you to identify and organize your information in a more accurate and flexible way. It is called extensible because it does not have a fixed format. An example of a mark-up language that has a fixed format is HTML. The difference between the two is that with XML you can define any element and call it whatever you like, while with HTML you already have pre-defined elements and attributes. For instance, to make text appear italic in a Web browser, you use the tags. Every modern browser knows how to display that text. Without pre-defined tags like this, XML allows you to define your own tags to both display and format text. This flexibility is exactly what Web services use to make it both platform and implementation independent.

Web services Model:



Web services can be classified as “Big” web services and “RESTful” web services. Big web services are based on SOAP standard.RESTful web services are based on the way how our web works ( world wide web / www). I my next blog we will see the details about Web services types.


Wednesday, March 4, 2015

Web services - Part1

What is Web services ?

As per W3C definition a Web Service is a "a software system designed to support interoperable machine-to-machine interaction over a network."
where Interoperable machines means one macchine(system) can be using php application while another is using jsp or asp etc and network is a computer network which allows computers to exchange data.

In simple terms : A web service is a function that can be accessed by other programs over the web (Http).

A web service differs from a web site in that a web service provides information consumable by software rather than humans. As a result, we are usually talking about exposed JSON, XML, or SOAP services.Web services are a key component in "mashups". Mashups are when information from many websites is automatically aggregated into a new and useful service. For example, take real stock data provided by another site and combine it with a fake trading application to create a stock-market "game".

Again, a web service is something that a website chooses to offer to those who wish to read, update and/or delete data from your website. You might call it a "backdoor" to your data. Instead of presenting the data as part of a webpage it is provided in a pre-determined way where some of the more popular are XML and JSON. There are several ways to communicate with a webservice, some use SOAP, others have REST'ful web services, etc.

Why to use Web services ?

The main purpose of Web services is to allow communication between distributed applications.Before Web services other technologies existed that met the functionality of today´s web service like COM, DCOM, CORBA etc. the disadvantages of these technologies were
1. Dependency on certain platform e.g. for a client to use a method on a remote computer, both the client and the server should have had the appropriate DCOM or CORBA libraries installed on their computers.
2. There are some firewall restrictions on using DCOM as it was designed to use the TCP/IP protocol over a LAN or WAN.DCOM passed it's data as binary messages on non-standard ports. This meant many firewalls blocked such traffic.

Web services resolved these issues. let's see the benefits of Web services :

1. Heterogeneous Communication :  you can use any Web services client environment to talk to any Web services server environment, that is a web service client can be developed on J2EE environment and Web services server or service provider can be developed on .NET or Unix environment.As long as the application that provides the functionality is packaged as a Web service each of these systems can communicate with any other.

2. Ease to consume and easy to expose : Web Services are built on the top of existing and widely adopted Internet protocols such as HTTP, XML, TCP/IP , HTML).So, its easy to consume a Web service as client and expose a Web service as a Web service provider.

3. No Firewall restriction : Web services communicate using the XML.Since XML is a text based protocol that all applications can understand and Firewalls do not block Text information.

In my next blog we will see Web Services Standards and Architecture .

                                                                                                          Web services standards >  
                                                                                                          

Total Pageviews