Rquirozsilva
Contributor
Contributor

Problems with variables SOAP response call, VRO.

Jump to solution

Hi vmware friends,

I have some problems with a response from a soap WS. When the call is done using the template Workflow 'Invoke a SOAP operation', Everything is fine without problems, but when i try to get the response variables from the parameter (outparameters), there are some parameters that are null. In the logs, i can see that this parameters are not null but when i try to get them using "parameter.get()" fails.

I think that the error is generated in the tags response xml are strings plus dots "."  .Example: "<cc.virtualmachine>". 

The xml response of the soap call has this schema:

 

<model>
	<keys>
		<TaskID type="String">T257</TaskID>
	</keys>
	<instance recordid="T257 -Provision Maquina Virtual -approved -TEST" uniquequery="header,number=&quot;T257&quot;">
		<header type="Structure">
			<TaskID type="String">T257</TaskID>
			<Category type="String">Provision Maquina Virtual</Category>
			<Status type="String">En Curso</Status>
			<Coordinator type="String">XXXX.XXX</Coordinator>
			<PlannedStart type="DateTime">2021-03-30T15:10:32+00:00</PlannedStart>
			<PlannedEnd type="DateTime">2021-03-31T03:00:00+00:00</PlannedEnd>
			<Reason type="String">business</Reason>
			<Phase type="String">Registro</Phase>
			<DateEntered type="DateTime">2021-06-03T20:11:30+00:00</DateEntered>
			<Open type="Boolean">true</Open>
			<Originator type="String">XXXX.XXX</Originator>
			<ParentChange type="String">C10484</ParentChange>
		</header>
		<description.structure type="Structure">
			<Description type="Array">
			<Description type="String">sfasfadsf</Description>
			</Description>
		</description.structure>
		<middle type="Structure">
			<Title type="String">TEST NO CONSIDERAR</Title>
		</middle>
		<close type="Structure"/>
		<Impact type="String">4</Impact>
		<Urgency type="String">4</Urgency>
		<cc.virtualmachine type="Array">
			<cc.virtualmachine type="StructureType">
				<VMName type="String">XXXX.XXXxxx</VMName>
				<CPU type="Decimal">2</CPU>
				<RAM type="Decimal">16</RAM>
				<NServicioHV type="String">123465</NServicioHV>
				<SistemaOperativo type="String">Windows Server</SistemaOperativo>
				<Idioma type="String">Español</Idioma>
				<ServicePack type="String">2</ServicePack>
				<TipoLicencia type="String">XXXX.XXX</TipoLicencia>
				<NServicioLicencia type="String">456789</NServicioLicencia>
				<NServerAlmacen type="String">65478</NServerAlmacen>
				<Vlan type="String">123</Vlan>
				<IP1 type="String">789</IP1>
				<IP2 type="String">456</IP2>
				<Gateway type="String">159</Gateway>
				<MascaraRed type="String">951</MascaraRed>
				<CantDisco type="Decimal">3</CantDisco>
				<Version type="String">10 Professional</Version>
			</cc.virtualmachine>
			<cc.virtualmachine type="StructureType">
				<VMName type="String">test2</VMName>
				<CPU type="Decimal">2</CPU>
				<RAM type="Decimal">2</RAM>
				<NServicioHV type="String">312321</NServicioHV>
				<SistemaOperativo type="String">Centos</SistemaOperativo>
				<Idioma type="String">Español</Idioma>
				<ServicePack type="String">2</ServicePack>
				<TipoLicencia type="String">XXXX.XXX</TipoLicencia>
				<NServicioLicencia type="String">412321</NServicioLicencia>
				<NServerAlmacen type="String">321321</NServerAlmacen>
				<Vlan type="String">12321</Vlan>
				<IP1 type="String">421321</IP1>
				<IP2 type="String">4123</IP2>
				<Gateway type="String">321421</Gateway>
				<MascaraRed type="String">32312</MascaraRed>
				<CantDisco type="Decimal">1</CantDisco>
				<Version type="String">3213214</Version>
			</cc.virtualmachine>
			<cc.virtualmachine type="StructureType">
				<VMName type="String">tes3</VMName>
				<CPU type="Decimal">2</CPU>
				<RAM type="Decimal">2</RAM>
				<NServicioHV type="String">3y2173261</NServicioHV>
				<SistemaOperativo type="String">Centos</SistemaOperativo>
				<Idioma type="String">Español</Idioma>
				<ServicePack type="String">2</ServicePack>
				<TipoLicencia type="String">XXXX.XXX</TipoLicencia>
				<NServicioLicencia type="String">dhjdhasjd</NServicioLicencia>
				<NServerAlmacen type="String">dhsajkdhsa</NServerAlmacen>
				<Vlan type="String">dhsajdhsa</Vlan>
				<IP1 type="String">3214</IP1>
				<IP2 type="String">412312</IP2>
				<Gateway type="String">34141</Gateway>
				<MascaraRed type="String">41321</MascaraRed>
				<CantDisco type="Decimal">2</CantDisco>
				<Version type="String">Version2</Version>
			</cc.virtualmachine>
		</cc.virtualmachine>
		<cc.vm.disk type="Array">
			<cc.vm.disk type="StructureType">
				<DiskName type="String">XXXX.XXX</DiskName>
			</cc.vm.disk>
			<cc.vm.disk type="StructureType">
				<DiskName type="String">XXXX.XXX</DiskName>
			</cc.vm.disk>
			<cc.vm.disk type="StructureType">
				<DiskName type="String">XXXX.XXX</DiskName>
			</cc.vm.disk>
			<cc.vm.disk type="StructureType">
				<DiskName type="String">test2</DiskName>
			</cc.vm.disk>
			<cc.vm.disk type="StructureType">
				<DiskName type="String">tes3</DiskName>
			</cc.vm.disk>
			<cc.vm.disk type="StructureType">
				<DiskName type="String">tes3</DiskName>
			</cc.vm.disk>
		</cc.vm.disk>
		<NProyecto type="String">0001485081</NProyecto>
		<Compania type="String">XXXX.XXXX.XXX.XXX</Compania>
		<RutCompania type="String">71704700</RutCompania>
		<Contacto type="String">XXXX.XXX.XXXX.XXX</Contacto>
		<EmailCliente type="String">XXXX.XXX</EmailCliente>
		<Direccion type="String">XXXX.XXX 466</Direccion>
		<Gerencia type="String">NO</Gerencia>
	</instance>
</model>

 

 When i run the workflow, generates the output parameters available:

 

2021-06-25 18:51:58.383 -04:00infooperation 'RetrieveChangeTask' successfully invoked.
2021-06-25 18:51:58.384 -04:00infoprocessing response...
2021-06-25 18:51:58.385 -04:00infoprocessing headers...
2021-06-25 18:51:58.386 -04:00infoout parameters available:
2021-06-25 18:51:58.387 -04:00info  + name: 'model.keys.TaskID', value: 'T257'
2021-06-25 18:51:58.388 -04:00info  + name: 'model.instance.header.TaskID', value: '<TaskID xmlns="http://schemas.hp.com/SM/7" type="String">T257</TaskID>'
2021-06-25 18:51:58.389 -04:00info  + name: 'model.instance.header.Category', value: '<Category xmlns="http://schemas.hp.com/SM/7" type="String">Provision Maquina Virtual</Category>'
2021-06-25 18:51:58.390 -04:00info  + name: 'model.instance.header.Status', value: '<Status xmlns="http://schemas.hp.com/SM/7" type="String">En Curso</Status>'
2021-06-25 18:51:58.391 -04:00info  + name: 'model.instance.header.Coordinator', value: '<Coordinator xmlns="http://schemas.hp.com/SM/7" type="String">XXXX.XXX</Coordinator>'
2021-06-25 18:51:58.392 -04:00info  + name: 'model.instance.header.PlannedStart', value: '<PlannedStart xmlns="http://schemas.hp.com/SM/7" type="DateTime">2021-03-30T15:10:32+00:00</PlannedStart>'
2021-06-25 18:51:58.393 -04:00info  + name: 'model.instance.header.PlannedEnd', value: '<PlannedEnd xmlns="http://schemas.hp.com/SM/7" type="DateTime">2021-03-31T03:00:00+00:00</PlannedEnd>'
2021-06-25 18:51:58.394 -04:00info  + name: 'model.instance.header.Reason', value: '<Reason xmlns="http://schemas.hp.com/SM/7" type="String">business</Reason>'
2021-06-25 18:51:58.395 -04:00info  + name: 'model.instance.header.Phase', value: '<Phase xmlns="http://schemas.hp.com/SM/7" type="String">Registro</Phase>'
2021-06-25 18:51:58.396 -04:00info  + name: 'model.instance.header.DateEntered', value: '<DateEntered xmlns="http://schemas.hp.com/SM/7" type="DateTime">2021-06-11T19:24:16+00:00</DateEntered>'
2021-06-25 18:51:58.397 -04:00info  + name: 'model.instance.header.Open', value: '<Open xmlns="http://schemas.hp.com/SM/7" type="Boolean">true</Open>'
2021-06-25 18:51:58.398 -04:00info  + name: 'model.instance.header.Originator', value: '<Originator xmlns="http://schemas.hp.com/SM/7" type="String">XXXX.XXX</Originator>'
2021-06-25 18:51:58.399 -04:00info  + name: 'model.instance.header.ParentChange', value: '<ParentChange xmlns="http://schemas.hp.com/SM/7" type="String">C10484</ParentChange>'
2021-06-25 18:51:58.400 -04:00info  + name: 'model.instance.description\.structure.Description', value: '<Description xmlns="http://schemas.hp.com/SM/7" type="Array"><Description type="String">sfasfadsf</Description></Description>'
2021-06-25 18:51:58.401 -04:00info  + name: 'model.instance.middle.Title', value: '<Title xmlns="http://schemas.hp.com/SM/7" type="String">TEST NO CONSIDERAR</Title>'
2021-06-25 18:51:58.402 -04:00info  + name: 'model.instance.close', value: 'null'
2021-06-25 18:51:58.403 -04:00info  + name: 'model.instance.Impact', value: '4'
2021-06-25 18:51:58.404 -04:00info  + name: 'model.instance.Urgency', value: '4'
2021-06-25 18:51:58.405 -04:00info  + name: 'model.instance.cc\.virtualmachine.cc\.virtualmachine[0]', value: '<cc.virtualmachine xmlns="http://schemas.hp.com/SM/7" type="StructureType"><VMName type="String">XXXX.XXXxxx</VMName><CPU type="Decimal">2</CPU><RAM type="Decimal">16</RAM><NServicioHV type="String">123465</NServicioHV><SistemaOperativo type="String">Windows Server</SistemaOperativo><Idioma type="String">Español</Idioma><ServicePack type="String">2</ServicePack><TipoLicencia type="String">XXXX.XXX</TipoLicencia><NServicioLicencia type="String">456789</NServicioLicencia><NServerAlmacen type="String">65478</NServerAlmacen><Vlan type="String">123</Vlan><IP1 type="String">789</IP1><IP2 type="String">456</IP2><Gateway type="String">159</Gateway><MascaraRed type="String">951</MascaraRed><CantDisco type="Decimal">3</CantDisco><Version type="String">2012 R2 Datacenter</Version></cc.virtualmachine>'
2021-06-25 18:51:58.406 -04:00info  + name: 'model.instance.cc\.virtualmachine.cc\.virtualmachine[1]', value: '<cc.virtualmachine xmlns="http://schemas.hp.com/SM/7" type="StructureType"><VMName type="String">test2</VMName><CPU type="Decimal">2</CPU><RAM type="Decimal">2</RAM><NServicioHV type="String">312321</NServicioHV><SistemaOperativo type="String">Centos</SistemaOperativo><Idioma type="String">Español</Idioma><ServicePack type="String">2</ServicePack><TipoLicencia type="String">XXXX.XXX</TipoLicencia><NServicioLicencia type="String">412321</NServicioLicencia><NServerAlmacen type="String">321321</NServerAlmacen><Vlan type="String">12321</Vlan><IP1 type="String">421321</IP1><IP2 type="String">4123</IP2><Gateway type="String">321421</Gateway><MascaraRed type="String">32312</MascaraRed><CantDisco type="Decimal">1</CantDisco><Version type="String">7.0</Version></cc.virtualmachine>'
2021-06-25 18:51:58.407 -04:00info  + name: 'model.instance.cc\.virtualmachine.cc\.virtualmachine[2]', value: '<cc.virtualmachine xmlns="http://schemas.hp.com/SM/7" type="StructureType"><VMName type="String">tes3</VMName><CPU type="Decimal">2</CPU><RAM type="Decimal">2</RAM><NServicioHV type="String">3y2173261</NServicioHV><SistemaOperativo type="String">Centos</SistemaOperativo><Idioma type="String">Español</Idioma><ServicePack type="String">2</ServicePack><TipoLicencia type="String">XXXX.XXX</TipoLicencia><NServicioLicencia type="String">dhjdhasjd</NServicioLicencia><NServerAlmacen type="String">dhsajkdhsa</NServerAlmacen><Vlan type="String">dhsajdhsa</Vlan><IP1 type="String">3214</IP1><IP2 type="String">412312</IP2><Gateway type="String">34141</Gateway><MascaraRed type="String">41321</MascaraRed><CantDisco type="Decimal">3</CantDisco><Version type="String">5.1</Version></cc.virtualmachine>'
2021-06-25 18:51:58.408 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[0]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">Trini1</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.409 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[1]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">Trini1</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.410 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[2]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">Trini1</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.411 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[3]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">test2</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.412 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[4]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">tes3</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.413 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[5]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">tes3</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.414 -04:00info  + name: 'model.instance.cc\.vm\.disk.cc\.vm\.disk[6]', value: '<cc.vm.disk xmlns="http://schemas.hp.com/SM/7" type="StructureType"><DiskName type="String">tes3</DiskName><DiskFilesystem type="String">1</DiskFilesystem><DiskSize type="Decimal">1</DiskSize></cc.vm.disk>'
2021-06-25 18:51:58.415 -04:00info  + name: 'model.instance.NProyecto', value: '0001485081'
2021-06-25 18:51:58.416 -04:00info  + name: 'model.instance.Compania', value: 'XXXX.XXXX.XXX.XXX'
2021-06-25 18:51:58.417 -04:00info  + name: 'model.instance.RutCompania', value: '71704700'
2021-06-25 18:51:58.418 -04:00info  + name: 'model.instance.Contacto', value: 'XXXX.XXX.XXXX.XXX'
2021-06-25 18:51:58.419 -04:00info  + name: 'model.instance.EmailCliente', value: 'XXXX.XXX'
2021-06-25 18:51:58.420 -04:00info  + name: 'model.instance.Direccion', value: 'XXXX.XXX 466'
2021-06-25 18:51:58.421 -04:00info  + name: 'model.instance.Gerencia', value: 'NO'

 

I can get the variables that dont have dots in their tags without problems:

 

System.log(outParameters.get("model.keys.TaskID"));

 

 But when i try to recover the VM data (that have dots in their tag name) out the schema using the same method from before, it fails and keeps saying null:

 

System.log("parametros VM[0]: " + outParameters.get("model.instance.cc\.virtualmachine.cc\.virtualmachine[0]"));

 

Is this error some kind of error generated from the tags name with dots? Or the calling method of the parameters is another one that i am not using?

Or maybe; Shoud i consider creating a manual workflow to invoke a soap operation replacing the response content tags name that have "dots" for another string without dots?

Any comment or ideas are highly aprecciated.

Thank u in advance,

A newbie VRO user.

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
xian_
Expert
Expert

Then add the following line to your code:

System.log(JSON.stringify(outParameters, null, 2));

and copy the output so we can see the structure of the variable (type: Properties).

View solution in original post

0 Kudos
4 Replies
xian_
Expert
Expert

Can you try putting the array index outside of the get() function?

 

outParameters.get("model.instance.cc\.virtualmachine.cc\.virtualmachine")[0]
0 Kudos
Rquirozsilva
Contributor
Contributor

Thank you for that idea, i have tried that and the script fails: 'TypeError: Cannot read property "0" from null'

I think that the orchestrator can not read properly the value, do you think that the dot in the tags are the problem??

0 Kudos
xian_
Expert
Expert

Then add the following line to your code:

System.log(JSON.stringify(outParameters, null, 2));

and copy the output so we can see the structure of the variable (type: Properties).

View solution in original post

0 Kudos
Rquirozsilva
Contributor
Contributor

When i run the method: System.log(JSON.stringify(outParameters, null, 2))
This is the answer:

2021-06-27 21:10:03.911 -04:00infoparameters structure: {
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[2]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[0]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.header.Reason": "<Reason xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">business</Reason>",
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[6]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[4]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.header.PlannedEnd": "<PlannedEnd xmlns=\"http://schemas.hp.com/SM/7\" type=\"DateTime\">2021-03-31T03:00:00+00:00</PlannedEnd>",
  "model.instance.Gerencia": "NO",
  "model.instance.Impact": "4",
  "model.instance.Contacto": "XXXX.XXX.XXXX.XXX",
  "model.instance.cc\\.virtualmachine.cc\\.virtualmachine[1]": "<cc.virtualmachine xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><VMName type=\"String\">XXXX.XXX</VMName><CPU type=\"Decimal\">2</CPU><RAM type=\"Decimal\">2</RAM><NServicioHV type=\"String\">312321</NServicioHV><SistemaOperativo type=\"String\">Centos</SistemaOperativo><Idioma type=\"String\">Español</Idioma><ServicePack type=\"String\">2</ServicePack><TipoLicencia type=\"String\">XXXX.XXX</TipoLicencia><NServicioLicencia type=\"String\">412321</NServicioLicencia><NServerAlmacen type=\"String\">321321</NServerAlmacen><Vlan type=\"String\">12321</Vlan><IP1 type=\"String\">421321</IP1><IP2 type=\"String\">4123</IP2><Gateway type=\"String\">321421</Gateway><MascaraRed type=\"String\">32312</MascaraRed><CantDisco type=\"Decimal\">1</CantDisco><Version type=\"String\">7.0</Version></cc.virtualmachine>",
  "model.instance.header.Open": "<Open xmlns=\"http://schemas.hp.com/SM/7\" type=\"Boolean\">true</Open>",
  "model.instance.Urgency": "4",
  "model.instance.header.DateEntered": "<DateEntered xmlns=\"http://schemas.hp.com/SM/7\" type=\"DateTime\">2021-06-11T19:24:16+00:00</DateEntered>",
  "model.instance.header.Originator": "<Originator xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">XXXX.XXX</Originator>",
  "model.instance.middle.Title": "<Title xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">TEST NO CONSIDERAR</Title>",
  "model.instance.header.Category": "<Category xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">Provision Maquina Virtual</Category>",
  "model.instance.header.Phase": "<Phase xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">Registro</Phase>",
  "model.instance.NProyecto": "0001485081",
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[1]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.header.Status": "<Status xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">En Curso</Status>",
  "model.instance.header.TaskID": "<TaskID xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">T257</TaskID>",
  "model.instance.header.PlannedStart": "<PlannedStart xmlns=\"http://schemas.hp.com/SM/7\" type=\"DateTime\">2021-03-30T15:10:32+00:00</PlannedStart>",
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[5]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.header.Coordinator": "<Coordinator xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">XXXX.XXX</Coordinator>",
  "model.instance.header.ParentChange": "<ParentChange xmlns=\"http://schemas.hp.com/SM/7\" type=\"String\">C10484</ParentChange>",
  "model.instance.cc\\.vm\\.disk.cc\\.vm\\.disk[3]": "<cc.vm.disk xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><DiskName type=\"String\">XXXX.XXX</DiskName><DiskFilesystem type=\"String\">1</DiskFilesystem><DiskSize type=\"Decimal\">1</DiskSize></cc.vm.disk>",
  "model.instance.EmailCliente": "XXXX.XXX",
  "model.instance.Compania": "XXXX.XXXX.XXX.XXX",
  "model.instance.cc\\.virtualmachine.cc\\.virtualmachine[0]": "<cc.virtualmachine xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><VMName type=\"String\">XXXX.XXX</VMName><CPU type=\"Decimal\">2</CPU><RAM type=\"Decimal\">16</RAM><NServicioHV type=\"String\">123465</NServicioHV><SistemaOperativo type=\"String\">Windows Server</SistemaOperativo><Idioma type=\"String\">Español</Idioma><ServicePack type=\"String\">2</ServicePack><TipoLicencia type=\"String\">XXXX.XXX</TipoLicencia><NServicioLicencia type=\"String\">456789</NServicioLicencia><NServerAlmacen type=\"String\">65478</NServerAlmacen><Vlan type=\"String\">123</Vlan><IP1 type=\"String\">789</IP1><IP2 type=\"String\">456</IP2><Gateway type=\"String\">159</Gateway><MascaraRed type=\"String\">951</MascaraRed><CantDisco type=\"Decimal\">3</CantDisco><Version type=\"String\">2012 R2 Datacenter</Version></cc.virtualmachine>",
  "model.instance.cc\\.virtualmachine.cc\\.virtualmachine[2]": "<cc.virtualmachine xmlns=\"http://schemas.hp.com/SM/7\" type=\"StructureType\"><VMName type=\"String\">XXXX.XXX</VMName><CPU type=\"Decimal\">2</CPU><RAM type=\"Decimal\">2</RAM><NServicioHV type=\"String\">3y2173261</NServicioHV><SistemaOperativo type=\"String\">Centos</SistemaOperativo><Idioma type=\"String\">Español</Idioma><ServicePack type=\"String\">2</ServicePack><TipoLicencia type=\"String\">XXXX.XXX</TipoLicencia><NServicioLicencia type=\"String\">dhjdhasjd</NServicioLicencia><NServerAlmacen type=\"String\">dhsajkdhsa</NServerAlmacen><Vlan type=\"String\">dhsajdhsa</Vlan><IP1 type=\"String\">3214</IP1><IP2 type=\"String\">412312</IP2><Gateway type=\"String\">34141</Gateway><MascaraRed type=\"String\">41321</MascaraRed><CantDisco type=\"Decimal\">3</CantDisco><Version type=\"String\">5.1</Version></cc.virtualmachine>",
  "model.instance.RutCompania": "XXXX.XXX",
  "model.instance.description\\.structure.Description": "<Description xmlns=\"http://schemas.hp.com/SM/7\" type=\"Array\"><Description type=\"String\">sfasfadsf</Description></Description>",
  "model.instance.Direccion": "XXXX.XXX 466",
  "model.keys.TaskID": "T257",
  "model.instance.close": null
}

 

With this answer i tried to get the data with outParameters.get("model.instance.cc\\.virtualmachine.cc\\.virtualmachine[0]") and it works perfectly, seems like i just needed another backslash, the json.stringify method show me the correct names for the call.
Now i have problems with the array, i can not get the full array with the get() method, but i can make a loop searching for the values of virtualmachines[n] until i find a null value that means the end of the array.
Thank you very much for your help xian_ , it helped a lot.
Rodrigo.

 

 

0 Kudos