CentraSite 10.3 | CentraSite Developer's Guide | Importing Objects Using API | Invoking Importer from Java Program | Removing Schema
 
Removing Schema
 
removeByName
remove
removeCascading
removeCascading
You can remove a schema from CentraSite. This function deletes the XML Schema object, the ExternalLink, and the resource in the repository.
Note:
If a schema is referenced by another object, for example, if it is referenced by the ExternalLink of a WSDL object, then it cannot be deleted.
This example demonstrates how to remove a schema from CentraSite:
import com.centrasite.jaxr.JAXRAccessor;
import com.centrasite.jaxr.schema.SchemaAdministrator;
import javax.xml.registry.infomodel.ExternalLink;
 
String dbURL = "http://localhost:53307/CentraSite/CentraSite";
String user = ...;
String password = ...;
 
JAXRAccessor jaxr = new JAXRAccessor(dbURL, user, password);
 
try
{
SchemaAdministrator sa = new SchemaAdministrator(jaxr);
sa.removeByName(“MySchema.xsd”, true);
}
catch (Exception e)
{
// handle error
}
finally
{
jaxr.close();
}
The SchemaAdministrator class provides the following methods for removing a schema: