简体   繁体   English

PHP Soap Client:WSDL错误

[英]PHP Soap Client: WSDL Error

I'm trying test some WSDL url and got the same error as mentioned here . 我正在尝试测试一些WSDL URL,并得到了与此处提到的相同的错误。

As I've no prior knowledge with WSDL, after doing some search, I found that this is because the location url in the soap:address tag ( http://459265-dev1/api/TestService.svc , in our case) is not reachable. 由于我对WSDL不了解,因此在进行了一些搜索之后,我发现这是因为soap:address标记(在我们的示例中为http://459265-dev1/api/TestService.svc )中的位置网址是不能达到。 Am I correct? 我对么? Is this a possibilty to get that error? 这有可能导致该错误吗?

Can you tell what this soap:address actually does? 您能告诉我这个soap:address实际做什么吗? and are there any other possibilities to get the same error? 并且还有其他可能性来得到相同的错误吗?

PS: The link provided above is not the API I was trying to test. PS:上面提供的链接不是我试图测试的API。 It was asked to keep the original link& its contents confidential, so, I brought up this similar example. 有人要求对原始链接及其内容保密,因此,我提出了这个类似的例子。

Your question isn't 100% clear but I'm assuming you are referring to the <soap:address> inside the WSDL? 您的问题不是100%清楚,但我假设您是指WSDL中的<soap:address> Normally that's where you should call the web service, but that might not always be the correct address. 通常,您应该在那儿调用Web服务,但这可能并不总是正确的地址。 See some more details here . 在这里查看更多详细信息。

Some automatically generated WSDL documents, like what WCF generates (since you have a .svc address I'm assuming a WCF webservice) expose the machine name as the address of the web service. 一些自动生成的WSDL文档,例如WCF生成的文档(因为您拥有一个.svc地址,我假设使用WCF Web服务)会将计算机名称公开为Web服务的地址。 If this web service is exposed externally under some domain address then the address in the WSDL resolves to the internal name of the server and is not reachable from outside so, yes, you can get "Could not connect to host" error messages. 如果此Web服务在某个域地址的外部公开,则WSDL中的地址将解析为服务器的内部名称,并且无法从外部访问,因此,是的,您会收到“无法连接到主机”错误消息。

Anything that the call cannot reach (unable to resolve the name, firewall prohibits it etc) can cause you that error message. 呼叫无法到达的任何内容(无法解析名称,防火墙禁止该名称等)都可能导致该错误消息。

Where did you get the WSDL from? 您从哪里获得WSDL? You had an address that ended in ?wsdl ? 您的地址以?wsdl结尾? Strip the ?wsdl and that's the address of your web service. 剥离?wsdl ,这就是您的Web服务的地址。 If you got the WSDL by some other means from the web service provider then ask them the correct address of the web service. 如果您通过其他方式从Web服务提供商那里获得了WSDL,请向他们询问Web服务的正确地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM