SoapClient:无法打开流:HTTP请求失败 [英] SoapClient : failed to open stream: HTTP request failed

查看:142
本文介绍了SoapClient:无法打开流:HTTP请求失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试使用PHP SOAP Client使用远程WCF Web服务.
给定服务的URL以及用户名和密码.

Hi,


I m trying to consume a remote WCF web service using PHP SOAP Client.
Given the URL for the service, and username and password.

$options = array(
                exceptions=true,
                trace=1,
                cache_wsdl=WSDL_CACHE_NONE,
                login='UName',
                password='ABCD';
            );

    $soapClient = new SoapClient('http://example.com/TestSrvice.svc?wsdl', $options);

This fails giving the warning 'failed to open stream: HTTP request failed!'

Can someone help me to solve this?

'http://example.com/TestSrvice.svc?wsdl' cant be accessed thru my web browser also

推荐答案

options = array( exceptions = true, trace = 1, cache_wsdl = WSDL_CACHE_NONE, login = ' UName', password = ' ABCD'; );
options = array( exceptions=true, trace=1, cache_wsdl=WSDL_CACHE_NONE, login='UName', password='ABCD'; );


soapClient = SoapClient(' http://example.com/TestSrvice.svc?wsdl',
soapClient = new SoapClient('http://example.com/TestSrvice.svc?wsdl',


选项); 无法给出警告' 无法打开流:HTTP请求失败!' 有人可以帮助 解决此问题吗? 也无法通过我的Web浏览器访问' http://example.com/TestSrvice.svc?wsdl'
options); This fails giving the warning 'failed to open stream: HTTP request failed!' Can someone help me to solve this? 'http://example.com/TestSrvice.svc?wsdl' cant be accessed thru my web browser also


这篇关于SoapClient:无法打开流:HTTP请求失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆