Software AG Products 10.7 | CentraSite for Developers | Importing Objects Using API | Invoking Importer from Java Program | Removing Registered Web Service
 
Removing Registered Web Service
 
removeService
removeServices
removeServiceByID
setDeleteTargetAssocs
setRemoveReferencedImports
This section describes the functions to remove a registered web service, its resources, associated registry objects, and the WSDL file in the CentraSite repository.
You must use an instance of the JAXRAccessor class to establish a CentraSite connection before calling the removeService or removeServiceByID function. Close the session by calling the close() method of JAXRAccessor.
Also before calling the removeService or removeServiceByID function, call the setter function.
This example demonstrates how to remove a web service from CentraSite:
import com.centrasite.jaxr.JAXRAccessor;
import com.centrasite.jaxr.webservice.WebServiceAdministrator;
 
String dbURL = "http://localhost:53307/CentraSite/CentraSite";
String wsdlFile = "c:/temp/MyService.wsdl";
String user = ...;
String password = ...;

 JAXRAccessor jaxr = new JAXRAccessor(dbURL, user, password);
 
try
{
WebServiceAdministrator wsa = new WebServiceAdministrator(jaxr);
int removeCount = wsa.removeServices(wsdlFile);
}
catch (Exception e)
{
// handle error
}
finally
{
jaxr.close();
}