Closed agrare closed 4 years ago
@agrare Is this using the stdlib wsdl/parser
? If so, that was removed after 1.8.7 and I'm actually planning on dropping support for any non-stable Ruby versions in the very near future. If not, which library is it using?
Hey @jrgarcia this is using soap4r-ng (https://github.com/rubyjedi/soap4r), this was the only wsdl parser that I found that would follow the xsd:import and xsd:include directives and works on rubies at least as new as 2.5.7 which is what I have locally
With https://github.com/vmware/rbvmomi/pull/176 merged running this script results in 0 incorrect wsdl_types for the vsphere-ws and spbm service WSDLs
I could see this being added to CI as well, so that if someone makes a PR with updates to the wsdl file it will immediately fail the PR.
Yeah that would be nice, my goal is to actually turn this into a rake task that will actually generate the whole vmodl file repeatably.
@jrgarcia I think now that we are on newer rubies, this one is ready to go.
I'll revisit this at some point this week. Thanks for the nudge!
Hey @agrare! I'd love to accept this now that we've dropped those nasty, old Ruby versions. Can you do me a favor and add activesupport
and soap4r-ng
to the development (since they are only in this dev script) dependencies in the Gemspec? After that, I think this looks great and will be extremely helpful.
@jrgarcia Its a deal ;)
This script parses the main vimService.wsdl and iterates through all of the ComplexTypes and checks that the params in the vmodl.db match the types from the WSDL.
It uses soap4r-ng which appears to be the only ruby soap wsdl parser that handles xsd:import/include directives which the VIM wsdls use extensively. This saved me a lot of manual parsing and recursive xml walking.
Example: