doujugu1722 2014-08-20 20:29
浏览 175
已采纳

PHP - SoapClient :: SoapClient无法打开流:连接被拒绝

I'm trying to integrate a PHP portal with a CRM(microsoft dynamics .NET) system using SOAP.

This is part of my code:

$client = new SoapClient("http://XX.XXX.X.XX:5050/host.svc?wsdl");

This line returns 2 errors

Warninig: Message: SoapClient::SoapClient(http://80.248.5.35:5050/host.svc?wsdl): failed to open stream: Connection refused

 Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load   from 'http://XX.XXX.X.XX:5050/host.svc?wsdl' : failed to load external entity 

Opening the link in the browser works and running this code in my local machine(localhost) works also. i've tried file_get_contents("http://XX.XXX.X.XX:5050/host.svc?wsdl"); but this returns a warning message

Message: file_get_contents(http://80.248.5.35:5050/host.svc?wsdl): failed to open stream: Connection refused

i've tried so many solutions from stackoverflow. If anyone could help me with this or shed more light on the situation cause this is my first attempt at something like this. Thanks

  • 写回答

1条回答 默认 最新

  • doueta6642 2014-09-03 17:12
    关注

    I found out the problem.

    My webserver was denying me from making outgoing connection through any port rather than the default port. i fixed it by changing the web service to the default pot on the ISS

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 U-Mamba/nnunetv2固定随机数种子
  • ¥15 vba使用jmail发送邮件正文里面怎么加图片
  • ¥15 vb6.0如何向数据库中添加自动生成的字段数据。
  • ¥20 在easyX库下编写C语言扑克游戏跑的快,能实现简单的人机对战
  • ¥15 svpwm波形异常求解答
  • ¥15 STM32——硬件IIC从机通信代码实现
  • ¥15 微生物组数据分析--微生物代谢物
  • ¥30 求一跃动小子保卫主公Java算法实现
  • ¥15 地图软件开发技术答疑(api, 地点获取,外观样式)
  • ¥20 物理远程控制麦克风使用问题