// an SDE for the name of the Component
XmlQName serviceQName = XmlQName.Factory.newInstance();
serviceQName.setQNameValue(new QName("http://www.extreme.indiana.edu/xcat/ccacore/componentID",
instanceName));
ServiceDataElement serviceNameSDE =
sdeFactory.newServiceDataElement(new QName(OGSI.OGSI_NS,
"instanceName"),
serviceQName);
sdm.addServiceData(serviceNameSDE);
// add SDEs for GSH's of each of the ports
String[] portNames = services.getProvidedPortNames();
for (int i = 0; i < portNames.length; i++) {
String portHandle = services.getPortHandle(portNames[i]);
String handleXMLString =
"<tns:providesPortHandle " +
"xmlns:tns=\"http://www.extreme.indiana.edu/xcat/ccacore/componentID\" " +
"name=\"" + portNames[i] + "\">" +
portHandle +
"</tns:providesPortHandle>";
ServiceDataElement handleSDE =
sdeFactory.newServiceDataElement(handleXMLString);
sdm.addServiceData(handleSDE);
}
String handleXMLString =
"<tns:componentHandle " +
"xmlns:tns=\"http://www.extreme.indiana.edu/xcat/ccacore/componentID\" " +
"name=\"" + instanceName + "\">" +
instanceHandle +
"</tns:componentHandle>";
ServiceDataElement handleSDE =
sdeFactory.newServiceDataElement(handleXMLString);
sdm.addServiceData(handleSDE);
} catch (ClassNotFoundException cnfe) {
logger.severe("Can't find class " + className + " for component", cnfe);