API Management 10.4 | CentraSite for Developers | 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:

Copyright © 2015- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release