<definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.xxx.com/test"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://www.xxx.com/test"
name="Example">
……
……
</definitions>
<definitions>定义了文档中用到的各个xml元素的namespace缩写,
[b]也界定了本文档自己的targetNamespace="http://www.xxx.com/test"[/b],
这说明 targetNamespace对应的命名空间所引用的元素才是本wsdl真正用到的和业务相关地方,
这意味着其它的XML要引用当前XML中的元素时,要声明这个namespace。注意xmlns:tns="http://www.xxx.com/test"这个声明,它标示了使用tns这个前缀指向自身的命名空间,tns引用的都是用来处理自身业务