Hi Again,
Having spent the morning googling and "playing" i have managed to get ti to work, its not pretty and not knowing how to manipulate XML in JavaScript, i have resorted to treating the XML as a big string.
Using getCatalogControlAccessByReferenceOrg
then:-
var accessSettings = actionResult.toXml();
var newSection = '<ns6:AccessSetting> <ns6:Subject href="'+org.href+'" name="'+org.name+'" type="application/vnd.vmware.admin.organization+xml"/> <ns6:AccessLevel>ReadOnly</ns6:AccessLevel> </ns6:AccessSetting>';
var accessSettingsEnd = accessSettings.indexOf("</ns6:AccessSettings>");
var accessSettingsStart = accessSettings.substring(0,accessSettingsEnd);
var accessSettingsFinish = accessSettings.substring(accessSettingsEnd,accessSettings.length);
accessSettingsStart += newSection;
accessSettingsStart += accessSettingsFinish;
var newAccessSettings = new VclControlAccessParams();
newAccessSettings.loadFromXml(accessSettingsStart);
and then updateCatalogControlAccessByReferenceOrg
i can share a catalog to an org.
I home that is helpful to someone else, and if anyone knows how to insert the newSection XML into the XML document using "proper" XML tools in javaScript, I would be very interested to lean how.
Regards,
Ian...