2011-05-24 43 views
1

可以使用扩展性元素(如SOAP)来扩展wsdl规范。WSDL文档中允许使用多少个WSDL规范扩展性元素

这些可扩展性元素周围出现的绑定,操作和WSDL文档的端口部分(http://www.w3.org/TR/wsdl - 2.1 WSDL文档结构)

我试图解析WSDL文档,规格似乎不是没有详细在给定的地方可能会出现多少个可扩展性元素。例如。对于给定的绑定,可以应用多个扩展,例如下面的示例?

<binding name="StockQuoteSoapBinding" type="defs:StockQuotePortType"> 
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> 
    <foo:otherextension foo="bar"/> 

尽管没有限定扩展名的数量,但没有示例说明使用多个扩展名。

回答

0

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>