Question : Php SOAP-ERROR: Parsing WSDL

Hi.
Using the code attached, I'm getting an SOAP-ERROR when I try to connect to a web service.

The code works when I use the http address, but shows an error when using the https.

Any ideas why?


SoapFault Object
(
    [message:protected] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl' : Start tag expected, '<' not found

    [string:private] =>
    [code:protected] => 0
    [file:protected] => /websites/Sc/www/test.php
    [line:protected] => 12
    [trace:private] => Array
        (
            [0] => Array
                (
                    [file] => /websites/Sc/www/test.php
                    [line] => 12
                    [function] => SoapClient
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0] => https://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl
                        )

                )

        )

    [faultstring] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl' : Start tag expected, '<' not found

    [faultcode] => WSDL
)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
try {
   $soap_url = "https://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl";
   $soap_client = new SoapClient($soap_url);
}
catch (Exception $e)
{
    echo '<pre>';
   print_r($e); 
   exit;
}

Answer : Php SOAP-ERROR: Parsing WSDL

Random Solutions  
 
programming4us programming4us