如前所述,WSDL 2.0使用6层组件来定义Web服务:类型,操作,接口,绑定,端点和服务。
WSDL 2.0这6层组件按照以下规则编写在XML文档中:
<description>是根元素。<types>是顶级元素,用作表示Types组件的容器。<interface>是顶级元素,用作表示Interface组件的定义,该组件包含一组操作组件。<binding>是顶级元素,用作表示Binding组件的定义。<service>是顶级元素,用作表示Service组件的定义,该组件包含一组Endpoint组件。
WSDL 2.0 XML文档的结构可以表示为:
<description ...>
<types>
...
</types>
<interface ...>
<operation ...>
<input>
...
</input>
<output>
...
</output>
...
</operation>
</interface>
<binding ...>
<operation .../>
</binding>
<service ...>
<port .../>
...
</service>
</description>
上一篇:
WSDL 1.1和2.0的API工具
下一篇:
WSDL 2.0 元素
