NAKAMURA, Hiroshi
6/6/2007 2:24:00 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Sorry for the late response.
Austin Ziegler wrote:
>> 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.
soap4r-1.5.6 might be able to handle that. At least wsdl2ruby.rb can
parse the definition...
> 0% time wsdl2ruby.rb --wsdl ../vimService.wsdl --type client
> I, [2007-06-06T23:16:44.122325 #7343] INFO -- app: Creating class definition.
> I, [2007-06-06T23:16:44.123911 #7343] INFO -- app: Creates file 'default.rb'.
> I, [2007-06-06T23:16:48.348865 #7343] INFO -- app: Creating mapping registry definition.
> I, [2007-06-06T23:16:48.350345 #7343] INFO -- app: Creates file 'defaultMappingRegistry.rb'.
> I, [2007-06-06T23:16:56.941461 #7343] INFO -- app: Creating driver.
> I, [2007-06-06T23:16:56.942492 #7343] INFO -- app: Creates file 'defaultDriver.rb'.
> I, [2007-06-06T23:16:58.957728 #7343] INFO -- app: Creating client skelton.
> I, [2007-06-06T23:16:58.958699 #7343] INFO -- app: Creates file 'VimServiceClient.rb'.
> I, [2007-06-06T23:17:00.725305 #7343] INFO -- app: End of app. (status: 0)
> 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:in `new'
[snip]
I've not yet call the method actually (see above; connection refused),
it may work. Can someone try it?
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iQEVAwUBRmbDXx9L2jg5EEGlAQLfNQf+PjuILyFvBtwKitfl/Z7P66yyZ/vNu4yV
4nTLoiArIfpjmO611Dxhx1gYP+tYt9KokmFujc+9g4kH2abEH12q/qrwbvGUHuiw
/7v7wY1Rcp/gJjKwrxvR0VoBi1dbYychPLlpbvX1Y0NTwnGbMiyOghKq/ODgSPC8
3PNCXK8mOvAdSBxhLXtaLBQwbAWj0zt3KDvmyKPHdJjtB7/kt2C8hj0gHSxZdzgp
DtEKJCFNH9DbTqBt5Ja+fobl+kQ8S/lVgAxmwUR5qq/JnBOflZAONZrU3QukRZFK
RB1ehSizgSTFQQKtVHNtJ1Qq7ozqWijlo8fhYcQ8TkP5IHOQmXRjMw==
=n0x+
-----END PGP SIGNATURE-----