VMware {code} Community
b3tts32
Contributor
Contributor

vim.wsdl issues (data type missing)

I'm new to the vsphere sdk and I'm  having a tough time getting started with things. I'm more of an administrator than a developer within IT and that's made things that much more tougher. I'm using a workflow application that imports wsdl files or webservice url's and exposes the methods for me to use to build the application. I'm stuck at importing the wsdl file. I'm importing the vimservice.wsdl file from sdk/wsdl/vim25/ and getting the error message.

System.InvalidOperationException: Unable to import binding 'VimBinding' from namespace 'urn:vim25'. ---> System.InvalidOperationException: Unable to import operation 'DestroyPropertyFilter'. ---> System.InvalidOperationException: The datatype 'urn:vim25:DestroyPropertyFilterRequestType' is missing.
   at System.Xml.Serialization.XmlSchemaImporter.FindDataType(XmlQualifiedName name, TypeFlags flags)

I've dug into the vim.wsdl file and found the DestroyPropertyFilter line but I can't see that anything is wrong there.

<element name="DestroyPropertyFilter" type="vim25:DestroyPropertyFilterRequestType"/>

What's weird is I can import the vimservice.wsdl from the regular vim folder just fine and I can see all of the methods. From the vim25 folder I get the error message. I've tried both the vsphere 4.1 and 5.0 sdk docs.

Any help or insight would be greatly appreciated.

0 Kudos
3 Replies
BenN
Enthusiast
Enthusiast

The type "DestroyPropertyFilterRequestType" is actually defined in the "query-messagetypes.xsd" schema file. Perhaps your workflow application isn't finding this file when reading "vim.wsdl" (which includes it via schemaLocation)?

This works from the (older) vim wsdl because the WSDL was a little different back then and didn't use types quite the same way (ie, there is no "DestroyPropertyFilterRequestType" at all).

0 Kudos
Steve_Jin
Expert
Expert

Good point.

As of vSphere 4.1, the WSDL file was broken into several files. I guess that is because VMware wanted to make it more modular and also not to fail Apache AXIS.

So far I found one case in which a type is missing: http://www.doublecloud.org/2011/09/missing-arrayofdatastoreeventargument/

Steve

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
b3tts32
Contributor
Contributor

Yeah it looks like it's not reading the xsd files or anything like that. I didn't get a whole lot of options from the company other than asking if there was a default "system location" they could be copied to or if there was a flat wsdl that could be used. Is it possible to import xsd's into the wsdl? I'm kind of throwing darts here to see what I come up with. I also just installed Visual Studio 2010 and I'm going to setup the c# environment to see where that gets me. Any other ideas?

0 Kudos