With use with Teiid tooling, we need a export the configuration for a data source. Through profile service, we could expose the all the properties for data source. However, in certain situations, we need to export the configuation in same format as they are defined i.e "???-ds.xml" file.
I tried to get the "ManagedDeployment" object for the DS and reading the contents of the file at first, but this does not work always, as if there are multiple DS defined in single deployment file, you get all of them. Also, if there are any updates on DS then they are also not visible though this mechanism in file.