Hi!
Thanks for a great library for Ruby!
I run ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] on Ubuntu 7.10 with soap4 1.5.8 installed as a gem.
The following command:
/var/lib/gems/1.8/bin/xsd2ruby.rb --xsd http://www.oasis-open.org/committees/dsml/docs/DSMLv2.xsd --mapping --force
Gives this error:
I, [2007-11-22T07:10:17.519199 #30109] INFO -- app: Creating mapping registry definition.
I, [2007-11-22T07:10:17.519842 #30109] INFO -- app: Creates file 'core_mapping_registry.rb'.
F, [2007-11-22T07:10:17.531428 #30109] FATAL -- app: Detected an exception. Stopping ... undefined method `have_any?' for #<WSDL::XMLSchema::Group:0xb77b4230> (NoMethodError)
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/complexType.rb:51:in `have_any?'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/wsdl/soap/complexType.rb:23:in `check_type'
/var/lib/gems/1.8/gems/soap4r-1.5.8/lib/wsdl/soap/complexType.rb:19:in `compoundtype'
.
.
.
I was able to make xsd2ruby.rb run by copying the methods below from soap4r-1.5.8/lib/wsdl/xmlSchema/complexType.rb to soap4r-1.5.8/lib/wsdl/xmlSchema/group.rb. All references to @complexcontent are thus completely pointless, and maybe this is not the right way to solve the issue anyway, but as it should be easy to reproduce I hope it can be solved in future versions of soap4r.
def have_any?
if c = @complexcontent || @content
c.have_any?
else
false
end
end
def choice?
if c = @complexcontent || @content
c.choice?
else
false
end
end
def elements
if c = @complexcontent || @content
c.elements
else
XSD::NamedElements::Empty
end
end
def nested_elements
if c = @complexcontent || @content
c.nested_elements
else
XSD::NamedElements::Empty
end
end
Regards,
David Eriksson, david+soap4r@2good.nu