VMware Cloud Community
Genue
Contributor
Contributor

vSphere web service sdk VMCreate SOAP Fault - InvalidRequestFault——2

Hi all :

when I run VMware-vSphere-SDK-5.0.0-429209\SDK\vsphere-ws\java\JAXWS\samples\com\vmware\vm\VMCreate.java

The followings happen . anyone can help me? thanks

HOST NAME : 192.168.20.203
SOAP Fault -
InvalidRequestFault
Message:
Attribute xsi:nil not allowed on element selectSet, which is not nillable.
while parsing property "skip" of static type boolean
while parsing serialized DataObject of type vmodl.query.PropertyCollector.ObjectSpec
at line 1, column 283
while parsing property "objectSet" of static type ArrayOfObjectSpec
while parsing serialized DataObject of type vmodl.query.PropertyCollector.FilterSpec
at line 1, column 183
while parsing call information for method CreateFilter
at line 1, column 94
while parsing SOAP body
at line 1, column 86
while parsing SOAP envelope
at line 1, column 22
while parsing HTTP request for method createFilter
on object of type vmodl.query.PropertyCollector
at line 1, column 0

Remark:-----------------------------------------------------------

I set the parameters as follewings

--url              [required] : url of the web service

--username         [required] : username for the authentication

--password         [required] : password for the authentication

--vmname           [required] : Name of the virtual machine

--datacentername   [required] : Name of the datacenter

--hostname         [required] : Name of the host

--guestosid        [optional] : Type of Guest OS

--cpucount         [optional] : Total cpu count

--disksize         [optional] : Size of the Disk

--memorysize       [optional] : Size of the Memory in 1024MB blocks

--datastorename    [optional] : Name of dataStore

0 Kudos
1 Reply
Genue
Contributor
Contributor

After two days of debugging, I found that is parameter fault , geustosid format should be like this

http://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/New-VM.html.

0 Kudos