Creating an ATOMSERVICE definition and Atom configuration file for a collection

Create an ATOMSERVICE definition and Atom configuration file for a collection by copying the equivalent files for the Atom feed from the same data and making minor changes.

About this task

ATOMSERVICE resource definitions has information about the different methods of resource definition and full reference information for the ATOMSERVICE resource definition attributes.

Procedure

  1. Copy the Atom configuration file for the Atom feed and rename it with any suitable name of your choice. Make the following changes to the file:
    1. Change the root element from <cics:atomservice type="feed"> to <cics:atomservice type="collection">.
    2. Change the <atom:title> child element of the <atom:feed> element to a suitable title for the collection. You do not have to change the <atom:title> child element of the <atom:entry> element.
    3. Change the <atom:id> child element of the <atom:feed> element to a suitable unique identifier for the collection.
    4. Change the href attribute of the <atom:link rel="self" href=" "> child element of the <atom:feed> element to specify the complete path that web clients can use to retrieve the collection. The beginning of the path must match the partial path that you stated in the URIMAP resource definition for the collection. For example, if you specified /myatomcoll/* as the path component in the URIMAP resource definition, you could specify <atom:link rel="self" href="/myatomcoll/collection.atom"> in the Atom configuration file. You may omit the scheme and host components of the URL, and specify only the path component.
    5. In the <atom:link rel="self" href=" "> child element of the prototype <atom:entry> element, change the href attribute so that the beginning of this standard path matches the partial path that you stated in the URIMAP resource definition for the collection. It is helpful to users (but not required) to also change the remainder of the path so that it is different from the path for the ordinary Atom feed from the corresponding data. The whole path must be different from the complete path that you specified in the <atom:link rel="self" href=" "> element for the collection. CICS appends the selector value supplied by the service routine, or a suitable unique identifier for the Atom entry, to the path to create a complete link for each Atom entry.

      For example, if you specified /myatomcoll/* as the path component in the URIMAP resource definition, and <atom:link rel="self" href="/myatomcoll/collection.atom"> as the link for the whole collection in the Atom configuration file, you could specify <atom:link rel="self" href="/myatomcoll/edit/"> as the standard path for entries in the collection.

      When CICS issues the Atom entry document, CICS changes the "self" attribute to "edit" as required by the Atom Publishing Protocol. Do not change this attribute yourself in the Atom configuration file. In this example, CICS issues links such as <atom:link rel="edit" href="/myatomcoll/edit/23">.
  2. Copy the ATOMSERVICE resource definition for the Atom feed, and rename it using the name that you specified in the URIMAP resource definition for the collection. Make the following changes to the definition:
    1. Change the ATOMTYPE attribute from FEED to COLLECTION.
    2. Change the CONFIGFILE attribute to the name of the Atom configuration file that you have just created for the collection.
  3. Install the ATOMSERVICE resource definition and the corresponding URIMAP resource definition that you created for the collection. You can also create a TRANSACTION resource definition for an alias transaction for the collection, following the instructions in Creating an alias transaction for an Atom feed, and install this resource definition.


dfhtl_atom_coll_atomservice.html | Timestamp icon Last updated: Sunday, 4 June 2017