?wsdl-php-web服务显示没有发现信息,无法添加引用


?wsdl php web service show no discovery information can not add reference

我得到了这个错误。这就是为什么我不能为我的项目添加引用。

您需要为WebService提供一个有效的WSDL。(WSDL文档)

尝试使用访问WebService的url?wsdl。示例:

http://my.url.com/webServiceFile.aspx变为http://my.url.com/webServiceFile.aspx?wsdl

你应该看到这样的东西。如果您收到错误消息,那么您尝试访问的WebService无效。

编辑:我刚刚意识到你屏幕截图中的URL字段是空白的,因为你没有在其中输入任何内容。您需要知道WebService的URL,然后将其插入该字段,确保最后有?wsdl

它需要类似于:

http://<your domain>.com/<WebService file>.aspx?wsdl

尝试添加:

header("Content-Type: text/xml");

在打印wsdl之前。