XMC Cat Manual

From D2I Wiki
Jump to: navigation, search

The topics discussed in this manual are grouped by section below. Click on any of the bullet points to see further details on that topic.

Contents

Installation

These installation instructions are written from the perspective of running XMC Cat using a Tomcat/Axis2 stack installed on a Linux server. Although XMC Cat is written in Java, it has not been tested on non-Linux platforms.

XMC Cat Operations

This section discusses each operation the XMC Cat metadata catalog exposes through its API

Status Operations

User Operations

Operations for Creating, Updating, Moving, Assigning or Deleting Metadata Objects

Helpful Hints

There is an invocation order dependency that must be observed when setting information to a CatalogDataType XmlObject. In the current XMC Cat 2.0 schema, the "parentId" and "catalogType" are defined as XML attributes while the domain-specific resource as an XML element. You must make the invocation to the CatalogDataType.set() method first to set the domain-specific XmlBeans resource, and then call CatalogDataType.setParentId() and/or CatalogDataType.setCatalogType(). If the call to .set() is not done first, it will clear any attributes set earlier and may result in an invalid XmlBeans object (and possibly a NullPointerException returned from the server if you blindly pass the invalid Xmlbeans in a request without validating it.

 CatalogDataType catalogDataType = requestType.addNewCatalogData();
 catalogDataType.set(domainResourceDoc); // must make this call first
 catalogDataType.setCatalogType(resourceType); // and make these calls afterwards
 catalogDataType.setParentId(parentUUID);

This odd behaviour has been observed on objects compiled with XmlBeans 2.3.0, since it is the version that XMC Cat supports. More investigations need to be done to find out if this is only a quirk specific to XmlBeans 2.3.0, or it exists in later versions as well.

To validate an Xmlbeans object on the client side, you can follow these steps to get some hints on why the Xmlbeans object is invalid:

 List<Object> errorList = new ArrayList<Object>();
 ...
 CatalogDataType catalogDataType = CatalogDataType.Factory.newInstance();
 // manipulate your CatalogDataType object to your heart's content
 ...
 if (!catalogDataType.validate(new XmlOptions().setErrorListener(errorList))) {
   for (Object obj : errorList) {
     System.out.println(obj.toString());
   }
 }

Querying Operations


XMC Cat Sample Code for Client Programs

  • XMC Cat Command Line Client Code Examples This section has small java code examples for each of the operations available in the XMC Cat WSDL. these snippets can be run from the command line (or from within an IDE such as Eclipse), but can also be used as a starting point for creating your own programs, interfaces, or tools that use XMC Cat. These examples can be run with or without using Apache Rampart transport level security that is available in XMC Cat version 2.x and later.


Using the XMC Cat GUI

Personal tools