简体   繁体   中英

Cannot access wcf service hosted on iis from php with soapclient

This has been really painful for the last few hours and I just have no more ideas what to do.

Tried many solutions that I found on here without any luck...

I have an iis server that is hosting a wcf web service. Simple stuff.

I can connect to this (example: http://mydomain.com/Service.svc?wsdl ) from the iis server and all other computers without any problems.

So I went on to make a php client on my computer - (using xampp via localhost) - (not on the iis server)

        $wcfClient = new SoapClient('http://mydomain.com/Service.svc?wsdl');
    $args = //input data
    $response = $wcfClient->GetData($args);
    print_r($response->GetDataResult->Post);

This works perfect. No problems at all. It returns all the data... Then I went on to upload this to my hosting account. This is the error I keep getting.

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ....

I have no more ideas. Disabled firewall, changed web.config a million times and still no luck. I tried the file_get_contents method to see what's up. I keep getting:

failed to open stream: Connection refused

我只是通过将iis服务器上的端口更改为80来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM