Official VmWare documentation describes how to use WseWsdl3.exe utility to generate csharp file VimService.cs from a set of .wsdl files:
wsewsdl3.exe /n:Vim25Api /type:webClient /l:CS vim.wsdl vimService.wsdl
Since the package Microsoft Web Services Enhancements (WSE) 3.0 for Microsoft .NET is deprecated, what is an alternative to generate the same VimService.cs (supposedly, with the utility SvcUtil.exe)?
The end goal is to create a self-contained script file which could generate final Vim25Service.dll without installing any old and unnecessary packages. The bad thing with WseWsdl3.exe is that it doesn't respect the principle of least privilege, i.e. it looks up the path to a supporting wsdl.exe utility in the system registry, which makes WseWsdl3.exe unportable. Luckily WseWsdl3.exe is a .NET application and I could easily modify it myself, so that it takes the path to wsdl.exe as an argument, but, unfortunately, the license does not allow reverse engineering and especially recompilation of the program.
When I try to use SvcUtil.exe like that:
SvcUtil.exe /language:cs vim.wsdl vimService.wsdl
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: There was a problem loading the XSD documents provided: a reference to a schema type with name 'DestroyPropertyFilterRequestType' and namespace 'urn:vim25' could not be resolved because the type definition could not be found in the schema for targetNamespace 'urn:vim25'. Please check the XSD documents provided and try again.
XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:vim25']/wsdl:portType[@name='VimPortType']
Use
wsdlto generate the C# file.https://msdn.microsoft.com/en-us/library/7h3ystb6(v=vs.100).aspx