ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Enterprise Application Development
    EC-332
    Progress0 / 37 topics
    Topics
    1. Overview of Enterprise Application Development: Microsoft technology history2. Introduction to .NET and its architecture3. Concept of MSIL, CLR, CLS, CTS4. Introduction to .NET framework: Managed and Unmanaged Code5. .Net Assembly6. Introduction to C# fundamentals7. Boxing and Unboxing8. Implementing multi-tier architecture9. Introduction to ADO.Net: SQL Injection, parameterized queries10. Usage of data set, Data adapter and command builder in disconnected model11. Introduction to delegate: Multicast delegates12. Introduction to windows forms13. HTML14. Introduction to javascript: javascript and its data types, variables, functions15. Debugging javascript using Firebug16. Introduction to various object models: Browser's Object (BOM), Document Object Model17. Introduction to Jquery: Jquery effects18. Introducing LINQ: LINQ to Objects, LINQ to SQL19. Query syntax, Operations (projection, filtering and join) using Linq Queries20. Introduction to ADO.NET entity framework: The entity data model, CSDL21. Eager vs lazy loading, POCO classes, DBContext API22. Querying entity data models23. Introduction to ASP.NET MVC24. MVC application structure, Controllers overview25. Action Methods, Parameterized action methods26. Introduction to razor syntax27. Code expressions, Code Blocks, Implicit Vs Explicit Code Expression28. Data annotations, Client and Server Side Validation29. Validation and model binding, Validation and model state30. MVC Membership, Authorization and security31. Introduction to service-oriented architecture: SOAP, WSDL32. Service contract, Data contract, XML, WCF bindings33. ABC of WCF, Restful services34. Consuming rest services (CRUD operations) using Jquery AJAX and JSON35. Introduction to web API36. Example of web API using CRUD Example37. MVC routing
    EC-332›Introduction to service-oriented architecture: SOAP, WSDL
    Enterprise Application DevelopmentTopic 31 of 37

    Introduction to service-oriented architecture: SOAP, WSDL

    8 minread
    1,292words
    Intermediatelevel

    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 load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time8 min
      Word count1,292
      Code examples0
      DifficultyIntermediate