Wednesday, March 7, 2012

Repository Web Service Limitations : ATG


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

1.Collection properties may not be set or gotten as a whole. Only elements of the collection may be set.

2.RepositoryItem properties are set or gotten as Strings in XML form

3.There 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.

4.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.

5.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 a java.lang.Boolean.

6.You cannot get or set a property of a non-simple type, other than atg.repository.RepositoryItem. This includes types such as java.util.Timestamp and java.sql.Date. Note, however, that if you retrieve a Date property, a java.util.Calendar will be returned.

7.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

1.The item to be updated must be supplied in XML form.

2.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.

No comments:

Popular Posts