Thursday, May 7, 2009

WSDL

Wsdl file is a xml file which describes the remote web service, i.e operations, parameters, return types , transports, bindings, and how to access the service.
To understand those we have to have a clear idea about the elements in the wsdl file. Following describes them one by one.

definition element
- The root element of all wsdl documents is the definitions element, which encapsulates the entire document and also provides a wsdl document with its name.
- Contains several xml namespace declarations.,
- among the namespaces one for the namespace of the wsdl 1.1 xml schema "http://schemas.xmlsoap.org/wsdl/" - declaring the wsdl namespace as the default namespace avoids having to qualify every wsdl element explicitly , with a prefix.
- also declares a 'targetNamespace' attribute.
- The 'message, portType, binding' elements are assigned lables using their 'name' attribute; these lables automatically ntake on the namespace specified by the 'targetNamespace' attribute.

types element
- serves as a container for defining any data types that are not describes by the xml schema built-in types: complex tyeps and custom simple types
- The data types and elements defined here are used by message definitionswhen declaring the parts ( payload) of the message

message element