More

    Web Services, Features and Components (WSDL and SOAP)

    Web services

    Basic Means: Web Services allow the consumer site (local) to get information from the provider site.

    Examples

    Any local web site can display real-time data  provided by the main site (www.Ford.com), but the user remains on the same page of the local site.

    Characteristics of web services

    • ASP.NET 2.0 has all the features that web-services provide.
    • Web-services is a method of providing information that can be accessed on the web by any developer application.
    • Its are made up of a library of information.
    • It is not a local web application, neither it is presented as web pages, nor as executable files (.exe); It is like a user interface.
    • The information contained in the web-service is wrapped as an XML document (in other words, plain text).
    • It communicate using open protocols such as SOAP.
    • It are services of self-contained and self-described nature.
    • HTTP and XML are the basis of web-services.
    • It can be published, searched and used on the web.
    • It use XML to code and decode data, and open protocols such as SOAP are used to transport web-services.

    Benefit of web services

    • Web developers can easily use web service and integrate them into web applications.
    • Saves  developer time by reducing code duplication.

    How to use Web services

    Web-services can be used in one of two ways

    • You can create it and put them on the web, and can be shared between other developers and other applications.
    • You can search for web service which can be added to your own application. (They are similar to plugins in that regard.)

    Components of web services

    Everything that is done with web-services is standardized.

    • Transmission method (method of transmitting it)
    • The method used to wrap or bind up web-services
    • The method by which web service is defined.

    All of the above functions are associated with the W3C standards, and all of these standards are based on XML. So they are quick and easy to download and use.

    Web Services Description Language (WSDL)

    WSDL is a language for describing and accessing it.

    Common features

    • WSDL is written using XML.
    • WSDL was informed by W3C on 26. June 2007.
    • The WSDL document is a simple XML document.
    • It includes a set of definitions to describe web service.

    WSDL Document Structure

    WSDL Document describes using several elements. The main structure of the WSDL document looks like this: –

    For loop in java: How to Outsmart Your Boss on For Loop In Java?

    <definitions>
    <types>
    data type definitions........
    </types>
    <message>
    definition of the data being communicated....
    </message>
    <portType>
    set of operations......
    </portType>
    <binding>
    protocol and data format specification....
    </binding>
    </definitions>

    There may also be other elements in the WSDL document, such as extension elements and service elements.

    SOAP (Simple Object Access Protocol)

    Basic Concept

    SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages. This is important to allow Internet communication between programs for application development.

    Need of SOAP

    Today’s applications communicate between objects such as DCOM and CORBA via Remote Procedure Calls (RPC), but HTTP was not designed for this task. The use of Remote Procedure Calls (RPC) brings a variety of problems such as compatibility and security. In addition, firewalls and proxy servers normally block or block such traffic.

    Solution : To solve this problem, SOAP was created so that it can be communicated between applications over HTTP as HTTP is supported by all Internet browsers and servers.

    Features of SOAP

    • SOAP is a communication protocol.
    • Can be communicated between various applications with the help of SOAP.
    • SOAP is platform independent.
    • OAP is language independent.
    • SOAP is based on XML.
    • SOAP is simple and extensible.
    • SOAP was reported by the W3C on 24. June 2003.

    SOAP Building Blocks

    The SOAP message is written in an ordinary XML document using the following elements: –

    Skeleton SOAP message

    < ?xml version="1.0"?>
    < soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
    < soap:Header>
    ...
    < /soap:Header>
    < soap:Body>
    ...
    <soap: Fault>
    ...
    </soap: Fault>
    < /soap:Body>
    < /soap:Envelope>

    Here

    • Envelope element : It identifies the XML document as a SOAP message.
    • Header element : It contains information related to header.
    • Body element : It contains call and response information.
    • Fault element : It contains information related to errors and status.

    All the above elements remain declare in the default namespace of the SOAP envelop.

    Recent Articles

    Related Stories

    Leave A Reply

    Please enter your comment!
    Please enter your name here

    Stay on op - Ge the daily news in your inbox