ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalEC-332Soa Introduction
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    EC-332

    Enterprise Application Development

    Progress0 / 37 done
    Topics37
    1Microsoft technology history2Introduction to .NET and its architecture3Concept of MSIL, CLR, CLS, CTS
    4Managed and Unmanaged Code5.Net Assembly6Introduction to C# fundamentals7Boxing and Unboxing8Implementing multi-tier architecture
    9SQL Injection, parameterized queries10Usage of data set, Data adapter and command builder in disconnected model
    11Multicast delegates12Introduction to windows forms13HTML
    14javascript and its data types, variables, functions15Debugging javascript using Firebug
    16Browser's Object (BOM), Document Object Model
    17Jquery effects
    18LINQ to Objects, LINQ to SQL19Query syntax, Operations (projection, filtering and join) using Linq Queries
    20The entity data model, CSDL21Eager vs lazy loading, POCO classes, DBContext API22Querying entity data models23Introduction to ASP.NET MVC24MVC application structure, Controllers overview25Action Methods, Parameterized action methods26Introduction to razor syntax27Code expressions, Code Blocks, Implicit Vs Explicit Code Expression28Data annotations, Client and Server Side Validation29Validation and model binding, Validation and model state30MVC Membership, Authorization and security
    31SOAP, WSDL32Service contract, Data contract, XML, WCF bindings33ABC of WCF, Restful services34Consuming rest services (CRUD operations) using Jquery AJAX and JSON35Introduction to web API36Example of web API using CRUD Example37MVC routing
    8 min read
    Topic 31 of 37
    Topic Study Note Illustration
    31

    Introduction to service-oriented architecture: SOAP, WSDL

    Service-Oriented Architecture (SOA) is a design pattern in software development where different components (or services) of an application are distributed and communicate over a network. Each service...

    Introduction to Service-Oriented Architecture (SOA):

    Service-Oriented Architecture (SOA) is a design pattern in software development where different components (or services) of an application are distributed and communicate over a network. Each service is designed to perform a specific task or function and is independent of other services. These services are loosely coupled and can interact with each other through well-defined interfaces.

    In SOA, the system is divided into small, independent services that can communicate with each other through a standard communication protocol. This approach makes it easier to scale, maintain, and integrate different components of an application or even external applications, while providing flexibility and reusability.

    Key Characteristics of SOA:

    1. Loose Coupling: Services are independent of one another. Changes made to one service typically don't affect others.
    2. Interoperability: Different services can communicate with each other, even if they are built using different technologies, as long as they adhere to the same communication standards.
    3. Reusability: Services can be reused across multiple applications and business processes.
    4. Discoverability: Services can be discovered and interacted with dynamically, often through service registries.
    5. Standardized Communication: Communication between services is standardized, often using protocols like HTTP, SOAP, or REST.

    In SOA, web services play a key role as the medium for communication between distributed systems, allowing for communication over a network.


    SOAP (Simple Object Access Protocol):

    SOAP is a protocol used in SOA to enable communication between web services. It is a messaging protocol that allows for the exchange of structured information in a platform-independent and language-neutral manner. SOAP relies on XML (eXtensible Markup Language) to define the message format, making it extensible and highly standardized for various operations.

    Key Features of SOAP:

    • XML-based: SOAP messages are formatted in XML, making them platform and language-agnostic.
    • Protocol Independence: SOAP can work over various protocols, such as HTTP, SMTP, and more, though HTTP is the most common.
    • Strictly Defined: SOAP messages have a strict structure defined by a header and a body. The header contains metadata, such as security information, while the body contains the actual message being sent.
    • Transport Neutral: SOAP is not dependent on any specific transport layer (e.g., HTTP, JMS, SMTP), making it suitable for different systems and networks.
    • Error Handling: SOAP provides built-in error handling through the use of standard fault messages in the header.

    A Basic SOAP Message Structure:

    A SOAP message consists of the following parts:

    • Envelope: The outermost element that defines the message.
    • Header (optional): Contains metadata such as authentication credentials or other instructions.
    • Body: Contains the actual data or information being exchanged.
    • Fault (optional): Contains error details if the message processing fails.

    Example of a simple SOAP message:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:web="http://www.example.com/webservice">
       <soapenv:Header/>
       <soapenv:Body>
          <web:GetUserDetails>
             <web:UserId>12345</web:UserId>
          </web:GetUserDetails>
       </soapenv:Body>
    </soapenv:Envelope>
    

    In this example:

    • The Envelope defines the message structure.
    • The Header is empty here but would normally contain metadata.
    • The Body contains the request, GetUserDetails, with a UserId parameter.

    SOAP vs REST:

    • SOAP is a protocol, while REST (Representational State Transfer) is an architectural style. SOAP is often seen as more rigid and suited for complex operations, while REST is simpler and more lightweight, commonly used for web applications.

    WSDL (Web Services Description Language):

    WSDL is an XML-based language used to describe the functionality offered by a web service. It provides a detailed blueprint of how to interact with the service, what operations it supports, the data types it uses, and the protocols it supports for communication.

    WSDL acts as a contract between the service provider (the server hosting the web service) and the client, ensuring that both parties understand the structure and behavior of the service.

    Key Features of WSDL:

    1. Service Definition: WSDL provides a formal description of the web service, including its location, methods, and parameters.
    2. Language Neutral: WSDL is independent of programming languages, allowing any application to understand how to interact with the web service.
    3. Port and Binding Information: WSDL specifies the network protocols (like SOAP or HTTP) and data formats the service uses.
    4. Operations and Messages: WSDL defines the operations (or functions) offered by the service and the format of the messages (input/output) for those operations.

    Structure of WSDL:

    A typical WSDL document has several key elements:

    • Definitions: The root element that contains all the WSDL definitions.
    • Types: Describes the data types used in the web service.
    • Message: Describes the messages exchanged in the web service, including input and output data.
    • PortType: Describes the operations available in the web service.
    • Binding: Specifies how the service will be accessed (e.g., via SOAP).
    • Service: Specifies the address or location where the service can be accessed.

    Example of a WSDL File:

    <definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                 xmlns:tns="http://www.example.com/webservice"
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                 name="UserService" targetNamespace="http://www.example.com/webservice">
        <types>
            <xsd:schema targetNamespace="http://www.example.com/webservice">
                <xsd:element name="GetUserDetailsRequest" type="xsd:string"/>
                <xsd:element name="GetUserDetailsResponse" type="xsd:string"/>
            </xsd:schema>
        </types>
    
        <message name="GetUserDetailsRequest">
            <part name="userId" element="xsd:string"/>
        </message>
    
        <message name="GetUserDetailsResponse">
            <part name="userDetails" element="xsd:string"/>
        </message>
    
        <portType name="UserServicePortType">
            <operation name="GetUserDetails">
                <input message="tns:GetUserDetailsRequest"/>
                <output message="tns:GetUserDetailsResponse"/>
            </operation>
        </portType>
    
        <binding name="UserServiceBinding" type="tns:UserServicePortType">
            <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="GetUserDetails">
                <soap:operation soapAction="http://www.example.com/webservice/GetUserDetails"/>
                <input>
                    <soap:body use="literal"/>
                </input>
                <output>
                    <soap:body use="literal"/>
                </output>
            </operation>
        </binding>
    
        <service name="UserService">
            <port name="UserServicePort" binding="tns:UserServiceBinding">
                <soap:address location="http://www.example.com/webservice"/>
            </port>
        </service>
    </definitions>
    

    In this example:

    • The message defines the request and response for the GetUserDetails operation.
    • The portType defines the available operation, GetUserDetails, and its input/output messages.
    • The binding specifies that the SOAP protocol will be used to interact with the service.

    How WSDL Works:

    • Discovery: A client can use WSDL to discover the operations available in the web service, including the message formats and transport protocols.
    • Client-Side Integration: Developers use WSDL to automatically generate proxy classes that allow them to interact with the web service programmatically.

    SOAP and WSDL Together:

    In the context of a SOAP-based web service, WSDL plays an important role by describing the operations the service provides, the input and output formats, and the communication protocol (like SOAP). The client application uses the WSDL document to understand how to interact with the service and generate the necessary code to make SOAP calls.

    1. SOAP is the protocol that defines how messages are exchanged between a client and a web service.
    2. WSDL describes how to interact with the web service, detailing the operations available, input/output parameters, and the service's location.

    By using SOAP and WSDL together, service providers and consumers can ensure seamless communication, regardless of the technologies and platforms involved.


    Summary:

    • Service-Oriented Architecture (SOA) is an architectural style that divides applications into loosely coupled services that communicate over a network.
    • SOAP is a messaging protocol used in SOA to exchange data in a standardized, XML-based format.
    • WSDL is a language used to describe web services, detailing their operations, data types, and communication protocols (like SOAP).
    • Together, SOAP and WSDL enable standardized communication between distributed systems, ensuring interoperability across different platforms and technologies.
    ← Previous topic 30
    MVC Membership, Authorization and security
    Next topic 32 →
    Service contract, Data contract, XML, WCF bindings

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    8mremaining
    1.3kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Enterprise Application Development