具有本地 wsdl 调用的 PHP Soap 客户端
我是 php 中的肥皂新手,所以如果我的描述不准确,我深表歉意。
我有工作肥皂客户端在提供商远程服务器中使用 wsdl(例如 www.remoteaddress.com/wsdl/webservice.wsdl)。我想知道是否可以通过从远程服务器下载该 wsdl 并将其本地上传到包含进行调用的 php 的同一文件夹来加速第一个 wsdl 调用(在将其放入缓存之前)。
php.net 说...
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL));
那么,请提问...该位置是否始终必须是 http 地址,还是可以使用本地 apache 服务器地址(以便引用比 public_html 更高级别的文件夹)?或者换句话说,我如何在“位置”中引用包含本地上传的 wsdl 的文件夹?这会加快速度吗?如果本地 wsdl 位于本地服务器的公共目录中,这是否会带来某种安全风险?尝试了与上面的本地主机的一些组合,但没有成功...
提前感谢您的帮助, 巴勃罗
I´m a newbie to soap in php, so I apologize if I´m not precise in my description.
I have working soap clients consuming wsdl´s in a providers remote server (eg www.remoteaddress.com/wsdl/webservice.wsdl
). I was wondering if I could speed up that first wsdl call (before getting it into de cache) by downloading that wsdl from the remote server and uploading it locally to the same folder that contains the php that makes the call.
php.net says...
$client = new SoapClient(null, array('location' => "http://localhost/soap.php",
'uri' => "http://test-uri/",
'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL));
So, questions please...does the location always have to be an http address or can a local apache server address be used (so as to reference a folder on a higher level than the public_html)? or in other words how do I reference in "location" the folder containing the the local uploaded wsdl? Would this speed things up, and if the local wsdl is in a public directory in my local server, does that pose some sort of security risk? Tried some combinations with the localhost above but none worked...
Thanks in advance for your help,
Pablo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论