VMware {code} Community
ttuser
Contributor
Contributor

Error Msg: The type VimApi.TraversalSpec was not expected

Hi fellow developers-

I am attempting to run the various SDK samples (v5.0). I am receiving a System.InvalidOperationException in the GetContentsRecursively method of the  ServiceUtil class every time the code hits the line: ObjectContent[] retoc = _connection.Service.RetrieveProperties(usecoll, new PropertyFilterSpec[] { spec });

The exception message is: There was an error generating the XML document. The inner exception message is:  The type VimApi.TraversalSpec was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.

thanks for any help in advance!

Reply
0 Kudos
0 Replies