Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180259

Export Resource Element (XML/text) from vCO using wf or scripts

$
0
0

Hi all,

 

I would like to export a resource element (xml/text) out from vCO to a shared folder on the LAN.

 

I know I could manually do that like: (I just want to automate this button in the scripts)

Capture.PNG

 

But can I do it in a WF/scripts?

So far, I've tried to use the following two methods in the API, but they both failed: (InResource is the resource element I created in the resources on vCO)

Approach 1,:

var mime = InResource.getContentAsMimeAttachment();
mime.write("C:\Users\Ryan Wade\Desktop\XML","play.xml");

Approach 2:

var xmlString = InResource.getContentAsMimeAttachment().content;
var text = XMLManager.newDocument();
text = XMLManager.fromString(xmlString);
XMLManager.saveDocument(text,"./opt");

 

Did I miss-use these two methods? Or are there other ways around to do so?

 

 

 

 

Thanks


Viewing all articles
Browse latest Browse all 180259

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>