cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Magento 1.9 - Fatal Error in SOAP API

Re: Magento 1.9 - Fatal Error in SOAP API

HI,

 

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://xx.xx.xxx.xxx/api/v2_soap/?wsdl' : failed to load external entity "http://xx.xx.xxx.xxx/api/v2_soap/?wsdl" in /var/www/html/salesorder.php:8 Stack trace: #0 /var/www/html/salesorder.php(8): SoapClient->SoapClient('http://xx.xx.xx...') #1 {main} thrown in /var/www/html/salesorder.php on line 8

 

Please suggest me to solve this fatal error!.

 

 

THANKS,

KARTHIK

3 REPLIES

Re: Magento 1.9 - Fatal Error in SOAP API

Hi @jeganee,

 

I guess you're using this example: https://devdocs.magento.com/guides/m1x/api/soap/sales/salesOrder/sales_order.list.html

 

DId you tried to access the conenction url with your browser to see the result?


Also, can you change the client URL with:

 

$client = new SoapClient('http://website.com/index.php/api/v2_soap/?wsdl');
--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Magento 1.9 - Fatal Error in SOAP API

Hi,

 

Yes. I followed steps from that URL only. Also I changed the URL like following:

 

$client = new SoapClient('http://xx.xx.xxx.xxx/index.php/api/v2_soap/?wsdl');

// If some stuff requires api authentication,
// then get a session token
$session = $client->login('exm', 'admin123');
$filter = array('filter' => array(array('key' => 'status', 'value' => 'closed')));
$result = $client->salesOrderList($session, $filter);

var_dump ($result);

 

I access this URL in the browser. Displayed XML file. But when run this in browser got below fatal error:

 

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://xx.xx.xxx.xxx/index.php/api/v2_soap/?wsdl' : failed to load external entity "http://xx.xx.xxx.xxx/index.php/api/v2_soap/?wsdl" in /var/www/html/salesorder.php:9 Stack trace: #0 /var/www/html/salesorder.php(9): SoapClient->SoapClient('http://xx.xx.xx...') #1 {main} thrown in /var/www/html/salesorder.php on line 9

 

Thanks

Re: Magento 1.9 - Fatal Error in SOAP API

Hi,

I have the same error, did you manage to solve it?

 

thanks!