softlayer / softlayer-api-php-client

A set of PHP libraries that assist in calling the SoftLayer API.
http://sldn.softlayer.com/
BSD 3-Clause "New" or "Revised" License
44 stars 22 forks source link

SoftLayer_Product_Package::getCategories is not retrieving data for some packages when using SoftLayer_XmlrpcClient #11

Open mhca opened 8 years ago

mhca commented 8 years ago

SoftLayer_Product_Package::getCategories is not retrieving data for some packages when using SoftLayer_XmlrpcClient

Example:

package to use: 263

========= php script =============

<?php require_once('…/softlayer-api-php-client-master/SoftLayer/XmlrpcClient.class.php'); $apiUsername = 'set me'; $apiKey = 'set me';

// Set the SoftLayer service to use. $serviceName ='SoftLayer_Product_Package'; $packageId = 263;

$client = SoftLayer_XmlrpcClient::getClient($serviceName, $packageId, $apiUsername, $apiKey); try { $categories = $client->getCategories(); print_r($categories); } catch(Exception $e) { echo "Unable to get categories: " . $e -> getMessage(); } ========= php script =============

Note: We are able to get categories using SoftLayer_SoapClient and REST.

underscorephil commented 8 years ago

Howdy!

I have been able to recreate this and have opened a bug request with our internal team.

I will update when we have more info!

mhca commented 8 years ago

Thank you!

camporter commented 8 years ago

There is a limitation with the default way in which libxml, a library that the xmlrpc extension in PHP uses, behaves in regards to documents > 10 MB. In this case, the result set is larger than 10 MB, so parsing the result dies.

There is a bug opened for this: https://bugs.php.net/bug.php?id=65604

I've opened https://github.com/php/php-src/pull/1515 to default to parsing documents larger than 10 MB.