public function getFromWebserviceImport($wsElement, $document = null, $params = [], $idMapper = null)
{
$data = $wsElement->value;
if (($data->indices === null or is_array($data->indices)) and ($data->current == null or is_numeric($data->current)) and ($data->currentIndex == null or is_numeric($data->currentIndex))) {
$indices = $data["indices"];
if ($indices instanceof \stdclass) {
$indices = (array) $indices;
}
$this->indices = $indices;
$this->current = $data->current;
$this->currentIndex = $data->currentIndex;
} else {
throw new \Exception("cannot get values from web service import - invalid data");
}
}