且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

传递带有相对路径模式的wsdl时,php SoapClient失败

更新时间:2023-02-23 08:31:35

正如我所怀疑的那样。

模式的相对路径意味着SoapClient在解析wsdl时会尝试使用代理作为参考来访问模式文件,如下所示:

The relative path to the schema means that the SoapClient when parsing the wsdl, will try to access the schema files using the proxy as reference, like so:

http://myproxy/schema1.xsd

由于我没有xsd文件,这会导致SoapClient抛出错误。

Since I do not have the xsd files, this will cause the SoapClient to throw an error.

这个问题的解决方案就是消除代理,所以外部资源的相对路径不受影响。溶剂可以在这里找到:

The solution to this problem then is to eliminate the proxy, so that relative paths to external resources are not affected. The sollution can be found here:

扩展php SoapClient以进行siteminder身份验证