Stylus Studio XML Editor

Table of contents

Appendices

3.3 Default Binding Rules

Default Binding Rules
  • HTTP Method Declaration. When formulating the HTTP message to be transmitted, the HTTP request method MUST be what is defined by the whttp:method attribute on operation, or with the whttp:defaultMethod attribute on binding.

  • Payload construction. When formulating the HTTP message to be transmitted, the contents of the payload (i.e. the contents of the HTTP message body) MUST be what is defined by the corresponding Message Reference or Interface Fault components:

    • Message Reference component: if the value of the [{message content model}] property is #any then the payload MAY be any one XML element. If the value is #none then the payload MUST be empty. Finally if the value is #element then the payload will be the element information item identified by the [{element}] property.

    • Interface Fault component: the payload will be the element information item identified by the [{element}] property.

    If the Message Reference component or the Interface Fault component is declared using a non-XML type system (as considered in the Types section of [WSDL-PART1]) then additional binding rules MUST be defined to indicate how to map those components into the HTTP envelope.

  • Serialization format. The HTTP request serialization format MUST be what is defined by the {http input serialization} property. The HTTP response serialization format MUST be what is defined by the {http output serialization} property. The HTTP serialization format of a fault MUST be what is defined by the {http fault serialization} property.

    Section [Serialization format of instance data] defines serialization formats supported by this binding along with their constraints.

  • Default input and output serialization format. [method_value] defines the default values for the GET, POST, PUT and DELETE values of the {http method} property.

    1The first column contains the value of the {http method} property. The second column contains the corresponding default {http input serialization}, and the third column the corresponding default {http output serialization}.method_value Default values for GET, POST, PUT and DELETE HTTP Method Default Input Serialization Default Output Serialization {http method} {http input serialization} {http output serialization}
    11GET 11 application/x-www-form-urlencoded 11 application/xml
    11POST 11 application/xml 11 application/xml
    11PUT 11 application/xml 11application/xml
    11DELETE 11 application/x-www-form-urlencoded 11application/xml
    NOTE: 

    The application/x-www-form-urlencoded serialization format places constraints on the stype of the interface operation bound (see [Serialization as ]).

    The default vales for the {http input serialization} and {http output serialization} properties for any other {http method} is application/xml.

    Mechanisms that are outside the scope of this specification MAY modify the serialization format of the instance_data corresponding to the output message. An example of such modification is the combination of the serialization as application/x-www-form-urlencoded and the SOAP-Response Message Exchange Pattern ([SOAP12-PART2], Section 6.3).

  • Accept headers. Standard HTTP accept headers (see section 14 of [RFC2616]) MAY be used in an HTTP request. When constructing an HTTP Accept header, the requester agent MAY take into account the expectedMediaType information (see [xmlbin-media-type]) appearing on an output message description to find out about the type of binary element content which is expected to be sent by the provider agent.