Because of the limitations inherent in Web Services, repository items must generally be passed in XML form. See the Repository to XML Data Binding chapter for information about transforming repository items into XML files and vice versa. In particular, you should bear in mind the following restrictions when you are creating repository Web Services:
get/setPropertyValue
Collection properties may not be set or gotten as a whole. Only elements of the collection may be set.
RepositoryItem
properties are set or gotten as Strings in XML formThere is no type of service that can get or set sub-properties. You must act upon the actual
RepositoryItem
you wish to read from or write to.You cannot get or remove elements from a set or list. This is because in order to remove elements from either, you need to provide the object to remove (or index, see below), and a Web Service cannot guarantee that that object is of a type that can be transformed from XML into a Java object.
You cannot get or set a property of a type that corresponds to a Java primitive. For example, you cannot get or set a
java.lang.Integer
or ajava.lang.Boolean
.You cannot get or set a property of a non-simple type, other than
atg.repository.RepositoryItem
. This includes types such asjava.util.Timestamp
andjava.sql.Date
. Note, however, that if you retrieve aDate
property, ajava.util.Calendar
will be returned.You cannot get a property that is not readable, or set a property that is not writable.
addItem
The item to be added must be supplied in XML form.
updateItem
The item to be updated must be supplied in XML form.
By default, when a repository item is passed into the Web Service, the existing
RepositoryItem
is found by matching repository IDs. We determine the value of the repository ID from the top-level XML element in the instance document, and then find a repository item with a matching ID.
removeItem
Users must pass in only the repository ID of the item to be removed.