Friday, July 26, 2013

Web Services

WSDL Elements
Element NameDescription
typesA container for abstract type definitions defined using XML Schema
messageA definition of an abstract message that may consist of multiple parts, each part may be of a different type
portTypeAn abstract set of operations supported by one or more endpoints (commonly known as an interface); operations are defined by an exchange of messages
bindingA concrete protocol and data format specification for a particular portType
serviceA collection of related endpoints, where an endpoint is defined as a combination of a binding and an address (URI)
Types:


The WSDL types element is a container for XML Schema type definitions. 
The basic structure of the types element (with namespaces omitted) is as follows (* means zero or more):
<definitions .... >
    <types>
        <xsd:schema .... />*
    </types>
</definitions>

Messages


The WSDL message element defines an abstract message that can serve as the input or output of an operation. Messages consist of one or more part elements, where each part is associated with either an element (when using document style) or a type (when using RPC style). 
<definitions .... >
    <message name="nmtoken"> *
        <part name="nmtoken" element="qname"? type="qname"?/> *
    </message>
</definitions>

Definition is the root of the WSDL.

Interfaces (portTypes)

It has input and output request. PortType is nothing but an interface which conveys the request and
response parameters.
<definitions .... >
    <portType name="nmtoken">
        <operation name="nmtoken" .... /> *
    </portType>
</definitions>
A portType is still considered an abstract definition because you don't know how its messages are represented on the wire until you apply a binding.

Bindings

The WSDL binding element describes the concrete details of using a particular portType with a given protocol. The binding element contains several extensibility elements as well as a WSDLoperation element for each operation in the portType it's describing.