Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 231085

Re: xml in vCO

$
0
0

Hi,

  Thanks for your help.

 

I tried your sample code and I got this error

 

[2015-09-14 15:27:48.482] [I] TypeError: Cannot read property "virtualWire" from undefined (Workflow:NSX PortgroupID / List organizations (item0)#13)

 

 

Here is my sample code:

var request = nsx_host.createRequest("GET", "/2.0/vdn/virtualwires", null);

var strBasicAuthentication;

strBasicAuthentication = "***";

 

request.setHeader("Accept","application/*+xml;version=5.6");

request.setHeader("Content-Type","application/xml");

request.setHeader("Authorization","Basic " + strBasicAuthentication);

 

var response = request.execute();

 

org_list = response.contentAsString;

 

for each (var wire in org_list.dataPage.virtualWire) {

  System.log("wire --> objectId: " + wire.objectId + " name: " + wire.name);

}


Viewing all articles
Browse latest Browse all 231085

Trending Articles



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