Node topNode = parent;
if (parent instanceof Document) {
BundleDescriptor bundleDesc = (BundleDescriptor) descriptor;
WebServicesDescriptor webServicesDesc = bundleDesc.getWebServices();
topNode = super.writeDescriptor(parent, webServicesDesc);
WebServiceNode wsNode = new WebServiceNode();
for(WebService next : webServicesDesc.getWebServices()) {
wsNode.writeDescriptor(topNode, WebServicesTagNames.WEB_SERVICE,
next);
}
}
return parent;
}