Hi,
I added Webservices SOAP users and Roles
And in Role Resources, select Resource Access to Custom and checked Sales-Order-Retrieve Orders info checkboxes.
Added below code in PHP file:
Request Example SOAP V2 (Simple Filter)
$client = new SoapClient('http://website.com/api/v2_soap/?wsdl');
// If some stuff requires api authentication,
// then get a session token
$session = $client->login('username', 'New API key');
$filter = array('filter' => array(array('key' => 'status', 'value' => 'closed')));
$result = $client->salesOrderList($session, $filter);
var_dump ($result);
In above code added username value to apiUser and New API key value to apiKey and added my website to soap client. But after saved and execute PHP file in browser get below fatal error.
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