To run an export, an import or an undo, first initialize a client, then call one of the three methods for these tasks.
Procedure
- In your custom code, initialize an Import and Export service client:
ImportExportServiceClient client = new ImportExportServiceClient();
- Do one of the following:
- To perform an export, call the client's
StartExport method, passing an array of Selection objects representing the items to export, plus an ExportInstruction object containing the configuration of your export.
- To perform an import, call the client's
StartImport method, passing a string containing the full path and filename of the import package, plus an ImportInstruction object containing the configuration of your import.
- To perform an undo, call the client's
StartUndo method, passing a string containing the full path and filename of the undo package, plus an UndoInstruction object containing the configuration of your import.
Each of these methods return a string containing its process ID. You can use this ID to check on the status of the process.