* : Object of Service bean
* @return Service name updated in XRegistry
* @throws GfacException
*/
public String updateObject(RegistryService regService, BeanObject serviceObject) throws GfacException {
ServiceBean serviceMap = (ServiceBean) serviceObject;
QName serviceName = new QName(serviceMap.getServiceName());
ServiceMapDocument oldServiceMap = RegistryUtil.getServiceMap(regService, serviceName);
String serviceMapStr = serviceXMLRequest(regService, serviceMap, null);
if (oldServiceMap != null) {
regService.removeServiceMap(serviceName.toString());
}
try {
RegistryUtil.registerServiceMapFromStr(regService, serviceMapStr);
} catch (Exception e) {
if (oldServiceMap != null) {
RegistryUtil.registerServiceMapFromStr(regService, oldServiceMap.xmlText());
}
throw new GfacException(e, FaultCode.ErrorAtClientWhileWsCall);
}
// System.out.println("######"+serviceMapStr);
String servicewsdl = RegistryUtil.createAwsdl4ServiceMap(serviceMapStr);
// / System.out.println("@@@@"+servicewsdl);
return serviceMap.getServiceName();
}