2014-08-20 20:29
浏览 163

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( 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( 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

图片转代码服务由CSDN问答提供 功能建议



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


  Warninig:消息:SoapClient  :: SoapClient(无法打开流:连接被拒绝
致命错误:未捕获的SoapFault异常:[WSDL] SOAP-ERROR:解析WSDL:无法 从'http://XX.XXX.X.XX:5050 / host.svc?wsdl'加载:无法加载外部实体

打开 浏览器中的链接工作并在我的本地计算机(localhost)中运行此代码也可以。 i已经尝试 file_get_contents(“http://XX.XXX.X.XX:5050 / host.svc?wsdl”); 但这会返回一条警告消息 \ n

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题