CentraSite Documentation : CentraSite Administrator’s Guide : Importing Objects Using the API : Invoking an Importer from a Java Program : Importing a Schema
Importing a Schema
The schema importer works closely together with the web service importer. Since a WSDL file of a web service may import or include schema files, CentraSite enables you to design and store a schema before referencing WSDL files. Similarly, if a schema file is imported by more than one WSDL file, it could be beneficial to register the schema first, before registering the WSDL files. When a schema is imported, the file is copied into the CentraSite repository and an ExternalLink that controls the resource is created. If a schema imports (includes) further schemas, then the referenced schemas are also imported. The referenced relations are established by means of a Uses association in the registry. The following picture illustrates the relationship:
The following example demonstrates how to import a schema file into CentraSite:
import com.centrasite.jaxr.JAXRAccessor;
import com.centrasite.jaxr.schema.SchemaImporter;
 
String dbURL = "http://localhost:53307/CentraSite/CentraSite";
String xsdFile = "c:/temp/MySchema.xsd";
String user = ...;
String password = ...;
 
JAXRAccessor jaxr = new JAXRAccessor(dbURL, user, password);
 
try
{
SchemaImporter si = new SchemaImporter(xsdFile, jaxr);
si.add();
}
catch (Exception e)
{
// handle error
}
finally
{
jaxr.close();
}
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback