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

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 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器