I’m just getting my feet wet with Ruby and have decided that it’s the
perfect tool for a couple of projects I have on the go. One
component of a project is to be able to query (and eventually
manipulate) information being offered from a VMWare Virtual Center
server. They have a complete SDK available that’s supported on
Java, .Net and Axis. No mention of Ruby, but as long as it’s a
properly done WSDL implementation that shouldn’t matter, right ?
Anyway, I just downloaded the SDK and installed soap4r. When I try
to run wsdl2ruby.rb, I get the following errors.
Anyway, I just downloaded the SDK and installed soap4r. When I try
to run wsdl2ruby.rb, I get the following errors.
I haven’t tried the VIM WSDL with Ruby, but I can tell you that unless
you’re very familiar with the API, I wouldn’t recommend trying it as
an early project in Ruby. (I’m using gSOAP for C++ access to the API;
I’m succeeding, but the API makes LDAP look sane.)
Hmmm - I’ve got lots of experience with LDAP But thanks for the
pointer - should you ever decide to give it a shot with Ruby, I’d be
very interested in hearing how it goes… Out of curiosity, do you
think it would be possible to edit vim.wsdl file to limit it to
certain basic inventory functions?
Anyway, I just downloaded the SDK and installed soap4r. When I try
to run wsdl2ruby.rb, I get the following errors.
I haven’t tried the VIM WSDL with Ruby, but I can tell you that unless
you’re very familiar with the API, I wouldn’t recommend trying it as
an early project in Ruby. (I’m using gSOAP for C++ access to the API;
I’m succeeding, but the API makes LDAP look sane.)
soap4r-1.5.6 might be able to handle that. At least wsdl2ruby.rb can
parse the definition…
wsdl2ruby.rb --wsdl …/vimService.wsdl --type client 12.89s user 3.97s system 82% cpu 20.335 total
0% ls -l
total 2368
-rw-rw-r-- 1 nahi nahi 112947 Jun 6 23:17 VimServiceClient.rb
-rw-rw-r-- 1 nahi nahi 760335 Jun 6 23:16 default.rb
-rw-rw-r-- 1 nahi nahi 180123 Jun 6 23:16 defaultDriver.rb
-rw-rw-r-- 1 nahi nahi 1323481 Jun 6 23:16 defaultMappingRegistry.rb
0% ruby -rdefaultDriver -e ‘VimPortType.new.retrieveServiceContent(RetrieveServiceContent.new(ManagedObjectReference.new(“Serviceinstance”)))’
/usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1523:in initialize': Connection refused - connect(2) (localhost, #443) (Errno::ECONNREFUSED) from /usr/local/lib/ruby/site_ruby/1.8/http-access2.rb:1523:innew’
[snip]
I’ve not yet call the method actually (see above; connection refused),
it may work. Can someone try it?
Hmmm - I’ve got lots of experience with LDAP But thanks for the
pointer - should you ever decide to give it a shot with Ruby, I’d be
very interested in hearing how it goes… Out of curiosity, do you
think it would be possible to edit vim.wsdl file to limit it to
certain basic inventory functions?
The vast majority of the WSDL (it’s pretty large at 900k) is the data
structure declarations, not the method calls. It’s also polymorphic
depending on xsd:anyType; I don’t know how well SOAP4R handles that (I
haven’t tried, yet).
So no, editing it won’t help.
-austin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.