PHP Web 服务 SOAPClient 错误
我有一个 web 服务,只是做简单的事情来调用 SOAP 客户端中的 web 服务
,即
$client = new SoapClient("http://test.unistream.com/wcflib/service.svc?WSDL");
它说
SOAP-ERROR: Parsing WSDL: 'IWebService_GetCountries_InputMessage' 已定义的
Web 服务是
http:// test.unistream.com/wcflib/service.svc?WSDL
谢谢。
I have a webserivce and just doing simple thing to call webservice in SOAP Client
i.e.
$client = new SoapClient("http://test.unistream.com/wcflib/service.svc?WSDL");
It says
SOAP-ERROR: Parsing WSDL: 'IWebService_GetCountries_InputMessage' already defined
web service is
http://test.unistream.com/wcflib/service.svc?WSDL
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它可能与此相关或相同的问题:
https://bugs.php.net/bug.php?id=43868 ,
您也可以在这里找到可能的解决方案
PHP SoapClient:分布式 WSDL 文件的问题
(可能重复... )
稍后编辑,这里另一个链接:http://www.codingforums.com/showthread。 php?t=181338
It might be related, or same issue with this:
https://bugs.php.net/bug.php?id=43868 ,
also you may find a possible solution here
PHP SoapClient: Problems with Distributed WSDL File
(maybe duplicate...)
later edit, here another link: http://www.codingforums.com/showthread.php?t=181338
问题在于“IWebService_GetCountries_InputMessage”类型在该 WSDL 中定义了多次。这不是您的代码的错误,而是您尝试使用的 WSDL 的错误。您应该与编写 WSDL 的人交谈,看看他们是否可以重新创建它并解决问题。
The issue is that the 'IWebService_GetCountries_InputMessage' type is defined more than once in that WSDL. This is not an error with your code, but with the WSDL you are attempting to consume. You should talk to whoever wrote the WSDL to see if they can recreate it and fix the issue.
我的系统遇到了同样的错误:Soap 客户端是用 PHP (5.3.10) 编写的,服务器端是用 .NET 编写的:
为了避免这种情况,我只需使用不区分大小写的标准.net 的功能,我将第一个 wsdl 称为小写 (“foo.wsdl”),而不是原始大小写 (Foo.wsdl)。
它起作用了,因为现在, foo.wsdl import Bar.wsdl 和 Bar.wsdl import Foo.wsdl ,并且由于我无法解释的奇怪的事情,PHP 喜欢这样。
I experienced the same error with my system : the Soap client was in PHP (5.3.10) and the server side was written in .NET :
To avoid this, i simply use the case-unsensitive standard feature of .net, and I call the first wsdl in lower case ("foo.wsdl") instead of original case (Foo.wsdl).
It worked because now, foo.wsdl import Bar.wsdl, and Bar.wsdl import Foo.wsdl, and by a curious things i cant explain, PHP likes that.