copy
Synopsis
string[] copy(SessionId sessionId,
BItemId[] itemIds,
OperationMode opMode,
string uri,
CopyOptions options)
throws BasketServiceFault;
See also: SessionId, BItemId, OperationMode, CopyOptions, BasketServiceFault
The copy operation of the basket web service is used to serialize a sub-set of the basket items to an OBX stream. The sub-set is defined by the itemIds parameter and flags of the opMode parameter. The OBX stream is written to a file specified by the uri parameter.
The set of items serialized to the OBX stream (the set of selected items) is determined as follows, starting with the set of items specified by the itemIds parameter (the default value of operation mode flags is false):
-
The operation fails if the set of selected items contains a planning item (right now, this should not happen as there is no way to get a planning item into the EAIWS).
-
If the
subPositionsflag istruein the operation mode, the operation adds all descendants of selected items to the set of selected items unless they are already explicitly or implicitly selected at the beginning of this step (an item is implicitly selected if it is a sub-article item of a composite article whose main article is explicitly selected, or part of a set-article whose set-article item is explicitly selected). -
For each selected set-article item, the operation ensures that all parts are selected too, adding them to the set of selected items if necessary.
-
If the
mainArticlesflag istruein the operation mode, the operation ensures that for each sub-article item contained in the set of selected items, the main article item is selected too, adding it to the set of selected items if necessary. If the flag isfalse, all sub-article items are removed from the set of selected items. -
For each main article item contained in the set of selected items, the operation ensures that all sub-article items are contained in the set of selected items, adding them if necessary.
If the uri parameter is empty, the file is created within the session’s working directory and the operation returns the URL of the file.
If the uri parameter is not empty, it must represent a file URL for a local file. The OBX stream is saved to this file unless the configuration of EAIWS does not allow access to the path specified by the URL, the file can not be created, or the file already exists and the overwrite option has not been specified.
The copy operation of the basket web service fails with a basket service fault if more than one item or composite article is to be copied and the application license feature egr.eai.basket.copy_paste is not enabled.