Using the supplied schema to write API commands

The CICS® Configuration Manager sample library SCCVSAMP contains a schema for the API. This schema is written in the W3C XML Schema 1.0 language. If you have a "schema-aware" XML editor, then you can use this schema to help you create valid XML for an API command.

The schema is divided into several files:

CCVXX
Defines the request format of CICS Configuration Manager API commands. This is the "master" schema for API commands: it includes other schemas (the other files in this list), and refers to the groups and data types defined in those schemas. Use this schema to create and validate API commands.
CCVXXCCV
Defines the element structure of CICS Configuration Manager repository and journal object types.
CCVXXDT
Defines common basic data types used in the API, such as a formatted time stamp.
CCVXXRES
Defines the element structure of CICS and CICSPlex® SM-specific resource definition object types.
Figure 1. Structure of API schema files

The sample library also contains these related members:

CCVXXT
Template for an API command.
CCVXXTCR
Template for a Create API command.
CCVXXTEN
Template for a SOAP envelope.
CCVXXOBJ
Schema for object data. This is intended for use with XML editors that can generate sample XML documents from schemas. You can use this schema to generate all of the XML elements for a resource definition object, repository object, or journal object.

Open this schema in your XML editor, select the option for generating a sample XML document, and then select the root element (the type of resource definition you want). Depending on the features of your XML editor, this will generate an XML document that contains all of the elements for that object type. This is especially useful for writing Create commands to create resource definitions.

CCVXXCAT
XML catalog for the schema.
CCVXXOUT
Schema for API command responses. Includes the same schemas as CCVXX, the master schema for API command requests. Use this schema to help predict and understand the format of API command responses.

To create the XML for an API command:

  1. Transfer the CCVXX* members from the sample library SCCVSAMP to your PC. Keep the member names, and add the following file extensions:
    • Give the CCVXXT* members and the CCVXXCAT member the file extension .xml (XML document)
    • Give the remaining CCVXX* members the file extension .xsd (XML schema)

    Save all of these files in the same folder on your PC.

  2. Open ccvxxt.xml in your XML editor.

    This XML document contains a reference to the schema. An XML editor can use the schema to automatically generate elements, and validate that the element contents match required values.

The schema does not define all of the rules required to write an API command. Use the schema together with this API reference.


Information Information

Feedback


Timestamp icon Last updated: Friday, 7 February 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///ccv-api-schema.htm