The wsdl specification can be extended using extensibility elements, such as SOAP.
These extensibility elements appear around the bindings, operations and port sections of the wsdl document (http://www.w3.org/TR/wsdl - 2.1 WSDL Document Structure)
I am trying to parse a wsdl document, and the specification doesn't seem to detail how many extensibility elements may appear in a given place. E.g. for a given binding, can multiple extensions be 开发者_运维技巧applied such as the example below?
<binding name="StockQuoteSoapBinding" type="defs:StockQuotePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<foo:otherextension foo="bar"/>
Whilst no limit on the number of extensions is defined, no examples exist that demonstrate the use of multiple extensions either.
The XML Schema for WSDL indicates that an unbounded number of elements (as long as they belong to a namespace outside of WSDL) can be used in one of the elements defined to be extensible:
<xs:complexType name="tExtensibleDocumented" abstract="true">
<xs:complexContent>
<xs:extension base="wsdl:tDocumented">
<xs:annotation><xs:documentation>
This type is extended by component types to allow elements from other namespaces to be added.
</xs:documentation></xs:annotation>
<xs:sequence>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
精彩评论