Error in DataImportManager::mergeTableData when called by Webservice (AX 2012)

Hi everybody,

we are currently trying to establish a webservice, which enables us to start the DAT / DEF import from an external tool. The means of this program is to distribute parameters and other company related data to a wide range of systems (developer systems).

therefor, we have built a webservice which starts the DAT/DEF export on a source system and afterwards starts the import on the target systems. The DAT / DEF files are stored on an accessible fileserver.

To this point, we managed to execute the export. The DAT and DEF file are written in the selected location. But as soon as we start the import on a target systen, we run into an error when the method DataImportManager::mergeTableData() is called from the SysDataImportManager.mergeData method with the variable “level” set to 2 (the first cycle with “level”=1 is executed without errors). At this point, the execution of the code stops and nothing more happens (we discovered this when we were debugging the service with VS).

Curiously, when we call the service from the client with a job and the exact same parameters, the import is executed without any problems.

Since the Class DataImportManager is a system class, we are not able to debug the code that is executed within. Only thing we know, is that the cache at runtime is the same in both cases.

Does anyone have a clue why a system class would behave differently, when it is (indirectly) called by a webservice from outside instead of being executed from a job on the client?

Thanks a lot in advance.

Jean