我在PHP的SoapClient中使用分布式WSDL文件(方案/其他定义在实际WSDL之外声明)时遇到问题.
I have a problem using a distributed WSDL File (scheme / other definitions are declared outside the actual WSDL) with PHP's SoapClient.
这是我收到的错误消息:
This is the fault message I got:
SOAP-ERROR: Parsing WSDL: 'getSomeInfo' already defined.经过一番谷歌搜索,这似乎是PHP中的一个错误,因为其他人发现了完全相同的问题: bugs.php/bug.php?id=45282
After some googling, it seems to be a bug inside PHP as someone else discovered exactly the same problem: bugs.php/bug.php?id=45282
是否有任何错误修复?有解决此错误的解决方案吗?
Has there been any bug fix(es)? Any solution to work around this bug?
我认为发布代码段是没有意义的,因为仅使用WSDL调用SoapClient ctor是唯一失败的方法.
I think posting a code snippet is senseless, since the invocation of the SoapClient ctor using just the WSDL is the only that fails.
推荐答案我遇到了同样的问题.问题出在wsdl和导入中,我从站点保存了wsdl,并指出soapclient使用本地文件,但是所有引用都是原始的.肥皂客户端每次都从远程主机获取文件,然后转到各个部分,然后再从它们返回到同一文件,但它们位于远程驱动器上.这导致同一文件被加载两次. 解决方案是仅使用远程文件或将路径重写为本地(全部).当您在项目wsdl上单击导出定义"时,SoapUI会执行此操作.希望对别人有帮助.
I had same issue. The problem was in wsdl and imports, I saved wsdl from site and pointed soapclient to use local file, but all references were original. Soap client each time gets file from remote host, went to parts, and from them back to same file but on remote drive. That caused same file to be loaded twice. Solution is to use only remote files or to rewrite paths to local (all). SoapUI does that when you hit "export definitions" on project wsdl. Hope that will help others.
更多推荐
PHP SoapClient:分布式WSDL文件的问题
发布评论