From 2f3909c089004d428b8d3d750692ee40663470a1 Mon Sep 17 00:00:00 2001 From: Anthony Roy Date: Mon, 12 May 2014 11:33:55 +0100 Subject: [PATCH] Changed type of Integer anyType parameters to int from long. Not sure if this is always appropriate to do or whether some sort of hint could be provided somehow to allow it to be tweaked. Seems that the long is being rejected by some validation of the anyType in vSphere. --- lib/rbvmomi/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rbvmomi/connection.rb b/lib/rbvmomi/connection.rb index 378a3e65..03094756 100644 --- a/lib/rbvmomi/connection.rb +++ b/lib/rbvmomi/connection.rb @@ -167,7 +167,7 @@ def obj2xml xml, name, type, is_array, o, attrs={} xml.tag! name, o.to_s, attrs end when Integer - attrs['xsi:type'] = 'xsd:long' if expected == BasicTypes::AnyType + attrs['xsi:type'] = 'xsd:int' if expected == BasicTypes::AnyType xml.tag! name, o.to_s, attrs when Float attrs['xsi:type'] = 'xsd:double' if expected == BasicTypes::AnyType