从WSDL到PHP的基本身份验证 [英] WSDL to PHP with Basic Auth
本文介绍了从WSDL到PHP的基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从基本身份验证背后的WSDL构建php类.
I need to build php classes from a WSDL that is behind basic auth.
它具有大量的名称空间,因此手动执行此操作看起来很麻烦.
It has tons of namespaces so it looks burdensome to do this by hand.
我尝试了一些工具,但似乎auth会话不存在.
I have tried a few tools but looks like the auth session isn't presistent.
推荐答案
$options = array(
'login' => $username,
'password' => $password,
);
$client = new SoapClient($wsdl, $options);
是的,它有效!我尝试了一个正在构建的解决方案,该解决方案可以连接到具有HTTP Basic Auth的客户WS.
Yes, it works! I tried in a solution that I was building and it connects to my customer WS which is with HTTP Basic Auth.
这篇关于从WSDL到PHP的基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文