ge_title -->

Service Oriented Architecture

Service Oriented Architecture

  • SOA is an architectural pattern in software design.
  • SOA application components provide services to other components via a communications protocol, typically over a network.
  • The principles of service-orientation are independent of any vendor, product or technology.
Service Oriented Architecture
Service Oriented Architecture

SOA Concepts and Principles

Design Concept

  • SOA is based on the concept of a service.
  • Depending on the service design approach taken,
  • Each SOA service is designed to perform one or more activities by implementing one or more service operations.
  • SOA defines how to integrate widely disparate applications for a Web-based environment and uses multiple implementation platforms. Rather than defining an API, SOA defines the interface in terms of protocols and functionality. An endpoint is the entry point for such a SOA implementation.

Types of SOA services

uThere are several types of services used in SOA systems.

  • Business services
  • Entity services
  • Functional services
  • Utility services

SOA benefits

  • Ability to build business applications faster and more easily
  • Easier maintenance / update
  • Business agility and extensibility
  • Lower total cost of ownership


  • The eXtensible Markup Language (XML),
  • Derived from the Standard Generalized Markup Language (SGML),
  • Was originally envisioned as a language for defining new document formats for the World Wide Web

XML Document

<?xml version=”1.0″ encoding=”UTF-8″ ?>

<order id=”1234″ date=”05/06/2013″>

  <customer first_name=”James” last_name=”Rorrison”>


  <phoneNumber>+44 1234 1234</phoneNumber>



  <order_line item=”H2G2″ quantity=”1″>



  <order_line item=”Harry Potter” quantity=”2″>




  <credit_card number=”1357″ expiry_date=”10/13″ control_number=”234″ type=”Visa”/>


XML Terminology

Terminology Definition
Unicode character An XML document is a string of characters represented by almost every legal Unicode character
Markup and content The Unicode characters are divided into markup and content. Markups begin with the character < and end with a > (<email>) and what is not markup is considered to be content (such as
Tag Tags come in three flavors of markups: start-tags (<email>), end-tags (</email>) and empty-element tags (<email/>)
Element An element begins with a start-tag and ends with a matching end-tag (or consists only of an empty-element tag). It can also include other elements, which are called child elements. An example of an element is <email></email>
Attribute An attribute consists of a name/value pair that exists within a start-tag or empty-element tag. In the following example item is the attribute of the order_line tag: <order_line item=”H2G2″>
XML Declaration XML documents may begin by declaring some information about themselves, as in the following example: <?xml version=”1.0″ encoding=”UTF-8″ ?>

XML Binding in Java

JAXB: Java Architecture for XML Binding

XML Binding in Java
XML Binding in Java

Marshalling and un-marshalling

Marshalling and un-marshalling

SOAP (Simple Object Access protocol)

  • It is a protocol specification for exchanging structured information in the implementation of web services in computer networks.
  • It uses XML Information Set for its message format, and relies on other application layer protocols, most notably Hypertext Transfer Protocol (HTTP),
  • Or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.
SOAP (Simple Object Access protocol)
SOAP (Simple Object Access protocol)

SOAP Elements and Attributes

Element Description
Envelope Defines the message and the namespace used in the document. This is a required root element
Header Contains any optional attributes of the message or application-specific infrastructure such as security information or network routing
Body Contains the message being exchanged between applications
Fault Provides information about errors that occur while the message is processed. This element is optional

Related Posts:

SOAP Request

POST /InStock HTTP/1.1


Content-Type: application/soap+xml; charset=utf-8

Content-Length: nnn

<?xml version=”1.0″?>

<soap:Envelope xmlns:soap=””


<soap:Body xmlns:m=””>


    <m:BookName>The Fleamarket</m:BookName>




SOAP Response

POST /InStock HTTP/1.1


Content-Type: application/soap+xml; charset=utf-8

Content-Length: nnn

<?xml version=”1.0″?>

<soap:Envelope xmlns:soap=”” soap:encodingStyle=””>

<soap:Body xmlns:m=””>


    <m: Price>10.95</m: Price>




Web Services

  • Web service is a realization of SOA.
  • It is important to note that the SOA is an architectural model that is independent of any technology platform and Web Services the most popular SOA implementation.
  • As the name implies, web services offers services over the web. This is not surprising as the choice of the Internet it already connects many different systems from all over the world.

Web Services Terminologies

  • Hypertext transfer protocol [HTTP]
  • Extensible Markup Language [XML]
  • Web Services Description Language [WSDL]
  • SOAP

How Do Web Services Work?

  • A Web service enables this communication by using a combination of open protocols and standards, chiefly XML, SOAP and WSDL.
  • A Web service uses XML to tag data, SOAP to transfer a message and finally WSDL to describe the availability of services.

Read Also:

Leave a Comment