Php 在wsdl中使用targetNamespace

Php 在wsdl中使用targetNamespace,php,web-services,wsdl,Php,Web Services,Wsdl,为什么我们在web服务的wsdl文件中使用targetNamespace,targetNamespace的实际用途是什么?我有一个web服务,我想通过wordpress插件访问web服务。我的插件wsdl文件如下所示 <definitions name='shop' targetNamespace='http://example.com/soap/' xmlns:tns='http://example.com/soap/' . . . . <service name='Cat

为什么我们在web服务的wsdl文件中使用targetNamespace,targetNamespace的实际用途是什么?我有一个web服务,我想通过wordpress插件访问web服务。我的插件wsdl文件如下所示

<definitions name='shop'
  targetNamespace='http://example.com/soap/'
  xmlns:tns='http://example.com/soap/'
.
.
.
.
<service name='CatalogService'>
    <port name='CatalogPort' binding='CatalogBinding'>
      <soap:address location='http://example.com/webservice/soap-server.php'/>
    </port>
  </service>

我无法理解targetNamespace在wsdl文件中的实际用途。

正如我们所知,wsdl文件可以导入其他wsdl文件,始终存在名称冲突的可能性。在targetnamespace的帮助下,我们可以确保taget标记不会与wsdl中的任何其他内容冲突。你可以从…读到更多

给你:Daniel给出的链接对理解也很有用。阅读该链接也可获得更多澄清。
targetNamespace='http://example.com/soap/'
xmlns:tns='http://example.com/soap/'