WSDL (Web Service Description Language)

 WSDL (Web Service Description Language)

It contains description of Webservice, it tells you what the webservice can do.

we have four parts of WSDL:-

(i) Data Definition

(ii) Operation Details

(iii) Transport Protocol Details

(iv) Address Details


(i) Data Definition:- It contain a request and response and temporary XSD details.

(ii) Operation Details:- It contain a name of the operation, what is input, what is output and fault.

(iii) Transport Protocol Details:- It contain a HTTP and SOAP details.

(iv) Address Details:- It contain a End point URI and URL.

Definition is the root element of WSDL.

Wsdl contains multiple blocks Type block, Message block, Port Type block.

Type Block 

<Types>

  <Schema>

    ------------

    ------------

  </Schema>

  </Types>

  <Types>

    <Schema>

    __________

    __________

   </Schema>

   <Schema>

     __________

     __________

   </Schema>

</Types>

In one WSDL contain a multiple types block, each type block contain multiple schema and every schema block contain multiple XSDS.


Message Block 

<message name='_______'>

<Part name='________' element ='............'>

</message>

Message block is an optional block in WSDL.

Types and Message block comes under data definition of WSDL, for one XSD we can create multiple message blocks, every complex element of xsd we can define under message block in Xsd.

___________ = userdefined

---------------- = predefined

Port Type Block

In Wsdl we can create multiple port type, each port type can have collection of operation.

Each operation we have three type of parameters.

(i) Input Parameter :- Mandatory and only one times.

(ii) Output Parameter :- Optional and only one times.

(iii) Fault Parameter :- Optional and only one times.

<PortType name= "__________">

<Operation name="__________">

<Input message="------------------"/>

<Output message="-----------------"/>

<fault name="__________" message="--------------"/>

 <fault name="__________" message="--------------"/>

</Operation>

</PortType>

<PortType name= "__________">

<Operation name="__________">

<Input message="------------------"/>

<Output message="-----------------"/>

</Operation>

<Operation name="__________">

<Input message="------------------"/>

</Operation>

</PortType>

We can call our xsd in Wsdl document in Type block.

Syntex to import XSD in WSDL

<Types>

    <Schema>

    <Import namespace='___________' SchemaLocation="-------------"/>

     </Schema>

</Types>

IQ. What is the difference between Import and Include Keyword ?

Ans:-both the keywords we are used to call the xsd in Wsdl document.

Include keyword we are using if the target namespace of both xsd and Wsdl is same then we go for Include keyword.

Import Keyword we are using if the target namespace of both xsd and Wsdl is different then we go for Import Keyword.

-----------------------------------------------------------------------------------------------------------------------------

We have two types of WSDL:-

(i) Abstruct WSDL

(ii) Concrite WSDL

=> Abstruct wsdl contains type, message, port type blocks

=> Concrite wsdl contains type, message, port type, binding and Services blocks.

Comments

Popular posts from this blog

Operational Branch in OSB

How to create application and project in OSB 12c, Hands on OSB 12C, Introduction of OSB, Differance Between OSB 11g and OSB12C

Business service called in another service, Use of business service