Home | | Web Technology | WSDL Types Element

Chapter: Web Technology : Web Services

WSDL Types Element

A Web service needs to define its inputs and outputs and how they are mapped into and out of services. WSDL element takes care of defining the data types that are used by the web service.

WSDL Types Element

 

A Web service needs to define its inputs and outputs and how they are mapped into and out of services. WSDL <types> element takes care of defining the data types that are used by the web service. In other words, the types element describes all the data types used between the client and server. The types element in WSDL doc is optional.

 

WSDL Message Element

 

The <message> element describes the data being exchanged between the Web service providers and consumers.

 

Each Web Service has two messages: input and output.

 

The input describes the parameters for the Web Service and the output describes the return data from the Web Service.

 

Each message contains zero or more <part> parameters, one for each parameter of the Web Service's function.

 

Each <part> parameter associates with a concrete type defined in the <types> container element. Lets take a piece of code from the Example:

 

<message name="SayHelloRequest">

 

<part name="firstName" type="xsd:string"/> </message>

 

<message name="SayHelloResponse"> <part name="greeting" type="xsd:string"/> </message>

 

Here, two message elements are defined. The first represents a request message SayHelloRequest, and the second represents a response message SayHelloResponse. Each of these messages contains a single part element. For the request, the part specifies the function parameters; in this case, we specify a single firstName parameter. For the response, the part specifies the function return values; in this case, we specify a single greeting return value.


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Web Technology : Web Services : WSDL Types Element |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.