wsdl规范可以使用可扩展性元素来扩展,比如SOAP。
这些可扩展性元素出现在wsdl文档(http://www.w3.org/TR/wsdl -2.1WSDL文档结构)的绑定、操作和端口部分周围。
我正在尝试解析wsdl文档,而规范似乎没有详细说明在给定位置可以出现多少个可扩展性元素。例如,对于给定的绑定,是否可以应用如下示例的多个扩展?
<binding name="StockQuoteSoapBinding" type="defs:StockQuotePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<foo:otherextension foo="bar"/>
虽然对扩展的数量没有定义限制,但也不存在演示多个扩展的使用的示例。
发布于 2011-05-26 08:49:53
XML Schema for WSDL表示可以在定义为可扩展的元素之一中使用无限数量的元素(只要它们属于WSDL之外的名称空间):
<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>
https://stackoverflow.com/questions/6113113
复制相似问题