Parsing Web Interface Description Language WSDL (6)

Source: Internet
Author: User
Tags format contains interface soap string wsdl
Web 3, MIME binding

The WSDL contains a way to bind an abstract type to a specific message in some MIME format. Bindings are defined for the following MIME types:

multipart/related
Text/xml
application/x-www-form-urlencoded (this format is used in place of forms in HTML)
Other (specified by MIME type string)

The definition of MIME types is heavy and development, so laboriously defining XML syntax for each MIME type is not the goal of WSDL. Add additional syntax to define additional MIME types when needed. If the MIME type string provides enough information to describe the content, you can use the MIME element defined below.

MIME bindings extend the WSDL using the following elements: (note the boldface callout)

... 1
... 2
* ... 3
<--MIME Element-->


... 4

1) mime:content

To avoid defining new elements for each MIME format, you can use the Mime:content element if you do not need additional information about the transfer format (instead of the MIME type string).



The property part is used to specify the name of the message part. If there is only one part, then its properties are optional. The property type contains a string of mime types. The value of the type is a slash (/), and each value can be a wildcard character (*). If you do not specify a type attribute, it means that all MIME types are optional.

If the return format is XML, but the pattern is not known beforehand, a generic MIME element can be used to indicate text/xml:



Wildcards can be used to specify a class of MIME types, as shown in the following example for all text types:



All the MIME types are specified in the following two examples:


2) mime:multipartrelated

The MIME-formatted part of the multipart/related MIME type aggregates into a message that uses the MIME type "multipart/related".

3) Mime:part

Element Mime:part describes the various parts of the multipart/related message. MIME elements that appear in the Mime:part element are used to specify specific MIME types for each section. If multiple MIME elements appear in a mime:part element, they can be substituted for each other.

4 Mime:mimexml in order to specify an XML load that is incompatible with soap (without SOAP encapsulation), but there is a special pattern, you can use the Mime:mimexml element to specify a specific pattern. The property part reference defines the message part of the concrete schema of the root XML element. If the message has only one part, then the part property can be ignored. Part to refer to a specific pattern for a single part using the element property, or to use the Type property to refer to the combined part.

5) Soap:body

When a SOAP request uses MIME binding, it is legal to use the element soap:body as a MIME element. This indicates that the type of the content is "text/xml" and that there is a soap wrapper.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.