CentraSite Documentation : CentraSite Administrator’s Guide : Importing Objects Using the API : Invoking an Importer from a Java Program : Importing a Web Service
Importing a Web Service
 
setDescription
setOrganization
setOrganization
setPackageName
setPackageObject
setUsedObject
setUsesObject
setWebDAVFolder
The basic input when importing a web service is a WSDL file describing one or more services. There are also some setter methods for additional parameters. The organization (per object or per name) must be set; other parameters are optional.
The following example demonstrates how to register a web service to CentraSite:
import com.centrasite.jaxr.JAXRAccessor;
import com.centrasite.jaxr.webservice.WebServiceRegistrator;
 
String dbURL = "http://localhost:53307/CentraSite/CentraSite";
String organizationName = "MyOrganization";
String wsdlFile = "c:/temp/MyService.wsdl";
String user = ...;
String password = ...;
 
JAXRAccessor jaxr = new JAXRAccessor(dbURL, user, password);
 
try
{
WebServiceRegistrator wsr = new WebServiceRegistrator(wsdlFile, jaxr);
wsr.setOrganization(organizationName);
wsr.register();
}
catch (Exception e)
{
// handle error
}
finally
{
jaxr.close();
}
The WebServiceRegistrator class provides the setter methods listed below. The setter methods must be called before calling the register() method.
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback