Page 221 - DCAP312_WEB_TECHNOLOGIES_II
P. 221

Unit 10: Web Services



            The W3C also states, “We can identify two major classes of Web services, REST-compliant Web   Notes
            services, in which the primary purpose of the service is to manipulate XML representations
            of Web resources using a uniform set of “stateless” operations; and arbitrary Web services, in
            which the service may expose an arbitrary set of operations
            SOAP Webservices provide a simple way of providing public information in websites. Directories,
            maps, translations, searches and zip code/postcode lookup all suddenly become quick and easy
            to implement, especially in .NET. Windows Live Webservice has now joined the market with a
            whole range of services which are likely to change the way we use the Web.
            A simple XML Web service using ASP.NET is relatively easy and is covered in Building XML Web
            Services Using ASP.NET Basics. However, the true power of XML Web services is realized when
            you look at the infrastructure. XML Web services are built on top of the .NET Framework and
            the common language runtime. An XML Web service can take advantage of these technologies.
            For instance, the performance, state management, and authentication supported by ASP.NET
            can all be taken advantage of by building XML Web services using ASP.NET.
            The  infrastructure  for  XML  Web  services  is  built  to  conform  to  industry  standards  such  as
            SOAP, XML, and WSDL, and this allows clients from other platforms to interoperate with XML
            Web  services.  As  long  as  a  client  can  send  standards-compliant  SOAP  messages,  formatted
            according to a service description, that client can call an XML Web service created using ASP.NET
            (regardless of the platform on which the client resides). When you build an XML Web service
            using ASP.NET, it automatically supports clients communicating using the SOAP, HTTP-GET,
            and  HTTP-POST  protocols.  Since  HTTP-GET  and  HTTP-POST  support  passing  messages  in
            URL-encoded name-value pairs, the data type support for these two protocols is not as rich as
            that supported for SOAP. In SOAP, which passes data to and from the XML Web service using
            XML, you can define complex data types using XSD schemas, which support a richer set of
            data types. Developers building an XML Web service using ASP.NET do not have to explicitly
            define complex data types they expect using an XSD schema. Rather, they can simply build a
            managed class. ASP.NET handles mapping class definitions to an XSD schema and mapping
            object instances to XML data in order to pass it back and forth across a network.
            Why use Web Services
            The major reasons for using Web services are to gain:

               1.  Interoperability among distributed applications that span diverse hardware and software
                 platforms.

               2.  Accessibility of applications through firewalls using Web protocols.
               3.  Across-platform, cross-language data model (XML) that facilitates developing heterogeneous
                 distributed applications.
            Because Web services are accessed using standard Web protocols, such as XML and HTTP, the
            diverse and heterogeneous applications on the Web (which typically already understand XML
            and HTTP) can automatically access Web services, solving the ever-present problem of how
            different systems communicate with each other. These different systems might be Microsoft
            SOAP Toolkits clients, J2EE applications, legacy applications, and so on. These systems might
            be written in a variety of programming languages, such as Java, C++, or Perl. As long as the
            application that provides the functionality is packaged as a Web service each of these systems
            can communicate with any other.
            Web Services represent a new standard-based and simplified model for creating and connecting
            distributed applications across the web in the form of services. Web Services are built on the top
            of existing and widely adopted Internet protocols such as HTTP, XML, TCP/IP , HTML , Java
            and XML . This means the base foundation for building the Web Services is already in place.


                                             LOVELY PROFESSIONAL UNIVERSITY                                   215
   216   217   218   219   220   221   222   223   224   225   226