Introduction – Service Oriented Architecture (SOA)

What is Web Service

AA�web serviceA�is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. XML is used to encode all communications to aA�web service. For example, a client invokes aA�web serviceA�by sending an XML message and waits for a corresponding XML response.

What is WSDL (Web Service Description Language)

WSDL is an XML-based protocol for information exchange in decentralized and distributed environments. WSDL definitions describe how to access a web service and what operations the service can perform. WSDL is a language for describing how to interface with XML-based services.

WSDL are of two types:

  • Concrete WSDL
  • Abstract WSDL

Example of Concrete WSDL

Concrete WSDL has fiveA�elements – Definitions, Types, Message, PortType, Binding, Service and Port

<wsdl:definitionsA�xmlns:tns=”http://xmlns.oracle.com/TestApplication/TestProject/HelloWorldMediator”A�xmlns:inp1=”http://xmlns.oracle.com/singleString”A�xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/”A�xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/”name=”HelloWorldMediator”A�targetNamespace=”http://xmlns.oracle.com/TestApplication/TestProject/HelloWorldMediator”>

<wsdl:documentation>

<abstractWSDL>

http://lin34001409.corp.capgemini.com:7101/soa-infra/services/default/TestProject!1.0/WSDLs/HelloWorldMediator.wsdl

</abstractWSDL>

</wsdl:documentation>

<wsdl:types>

<xsd:schemaA�xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>

<xsd:importA�namespace=”http://xmlns.oracle.com/singleString”A�schemaLocation=”http://lin34001409.corp.capgemini.com:7101/soa- A� A� A� infra/services/default/TestProject/HelloWorldMediator_ep?XSD=../Schemas/singleString.xsd”/>

</xsd:schema>

</wsdl:types>

<wsdl:messageA�name=”requestMessage”>

<wsdl:partA�name=”request”A�element=”inp1:singleString”/>

</wsdl:message>

<wsdl:messageA�name=”replyMessage”>

<wsdl:partA�name=”reply”A�element=”inp1:singleString”/>

</wsdl:message>

<wsdl:portTypeA�name=”execute_ptt”>

<wsdl:operationA�name=”execute”>

<wsdl:inputA�message=”tns:requestMessage”/>

<wsdl:outputA�message=”tns:replyMessage”/>

</wsdl:operation>

</wsdl:portType>

<wsdl:bindingA�name=”execute_pttBinding”A�type=”tns:execute_ptt”>

<soap:bindingA�transport=”http://schemas.xmlsoap.org/soap/http”/>

<wsdl:operationA�name=”execute”>

<soap:operationA�style=”document”A�soapAction=”execute”/>

<wsdl:input>

<soap:bodyA�use=”literal”/>

</wsdl:input>

<wsdl:output>

<soap:bodyA�use=”literal”/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:serviceA�name=”HelloWorldMediator_ep”>

<wsdl:portA�name=”execute_pt”A�binding=”tns:execute_pttBinding”>

<soap:addressA�location=”http://lin34001409.corp.capgemini.com:7101/soa-infra/services/default/TestProject/HelloWorldMediator_ep”/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

Example of Abstract WSDL

Abstract WSDL has fourA�elements – Definitions, Types, Message, PortType

<wsdl:definitionsA�xmlns:tns=”http://xmlns.oracle.com/TestApplication/TestProject/HelloWorldMediator”A�xmlns:inp1=”http://xmlns.oracle.com/singleString”A�xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/”A�name=”HelloWorldMediator”targetNamespace=”http://xmlns.oracle.com/TestApplication/TestProject/HelloWorldMediator”>

<wsdl:types>

<xsd:schemaA�xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>

<xsd:importA�namespace=”http://xmlns.oracle.com/singleString”A�schemaLocation=”../Schemas/singleString.xsd”/>

</xsd:schema>

</wsdl:types>

<wsdl:messageA�name=”requestMessage”>

<wsdl:partA�name=”request”A�element=”inp1:singleString”/>

</wsdl:message>

<wsdl:messageA�name=”replyMessage”>

<wsdl:partA�name=”reply”A�element=”inp1:singleString”/>

</wsdl:message>

<wsdl:portTypeA�name=”execute_ptt”>

<wsdl:operationA�name=”execute”>

<wsdl:inputA�message=”tns:requestMessage”/>

<wsdl:outputA�message=”tns:replyMessage”/>

</wsdl:operation>

</wsdl:portType>

</wsdl:definitions>

What is SOAP (Simple Object Access Protocol)

SOAP is a communication protocol designed to communicate via Internet. It is platform and language-independent. SOAP is the XML way of defining what information is sent and how to send. SOAP provides data transport for Web services. It can be used for broadcasting a message. Although SOAP can be used in a variety of messaging systems and can be delivered through a variety of transport protocols. SOAP message has four elements a�� Envelope, Header, Body and Fault.

<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>

<soap:Body>

<ns1:singleString xmlns:ns1=”http://xmlns.oracle.com/singleString”>raja</ns1:singleString>

</soap:Body>

</soap:Envelope>

What is UDDI (Universal Description Discovery and Integration)

UDDI is a web service registry that provides a mechanism to advertise and find web services. UDDI registry contains categorized information about service and its technical specifications. The technical specifications usually defined using WSDL. WSDL describes what a Web Service does, how it communicates, and where it lives. A Web Service consumer queries the UDDI registry to find the WSDL descriptions to determine how to use the Web Service. A UDDI registry is itself a Web Service. The UDDI specification defines an API based on SOAP messages, with a WSDL description of the registry service.

Types of Service

Web Services are of two types:

  • SOAP Based Web Service
  • RESTful Web Service

Leave a Reply

Your email address will not be published. Required fields are marked *

Show my latest post here