【发布时间】:2012-09-06 11:28:40
【问题描述】:
为什么我们在 Web 服务的 wsdl 文件中使用 targetNamespace,targetNamespace 的实际用途是什么?我在http://example.com/webservice/catalog.php 上有一个网络服务,我想通过 wordpress 插件访问网络服务。我的插件 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='http://example.com/soap/'
xmlns:tns='http://example.com/soap/'
我不明白 wsdl 文件中 targetNamespace 的实际用途是什么。
【问题讨论】:
标签: php web-services wsdl