Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Some SOAP functions (for example, list functions GetLicenseOrderList, GetCustomerList, and GetProductList) use an offset to handle arrays. For these functions, the returned values (such as licenses, customers, etc.) are stored into arrays of up to 100 elements. You can use an offset greater than 0 to get additional returned values. For example, for GetCustomerList: If you have 321 customers, you would run this method 4 times using the offsets 0, 100, 200, 300. The first 3 responses will have 100 customers each, and the last response will have 21 customers.

To find the end of the data (since you may not know the number of elements), you can stop looping when the query returns less than 100 results. For example:

No Format
for (int i = 0; ; i++)
{
  Soap_Response_List_LicenseOrder LOList = c.GetLicenseOrderList(L.token, 100 * i);

  foreach (Soap_LicenseOrder LO in LOList.result_array)
  {
    // Process data in result array
  }

  if (LOList.result_array.Length < 100)
    break;
}