Forum: Ruby wsdl2ruby generating broken ruby code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
59972505b46816ac6968bc7eeaaddb49?d=identicon&s=25 David Jameson (Guest)
on 2009-03-04 19:25
(Received via mailing list)
The piece of schema below is  producing a broken ruby class (further
below) --- note that the fields messageResourceFactory and
propertyMessageResourcesFactory (from the xs:choice elements above) are
defined multiple times both as fields and in the parameter list for the
initialize method. It looks like no changes have been made to soap4r
since
2007 --- I'm wondering if anyone knows how to deal with this problem,
it's a
showstopper issue for us --- means we can't support  ruby, which we
really
want to do.

Thanks in advance,
David Jameson


----------------------------------

  <xs:complexType name="messageResources" abstract="true">
    <xs:sequence>
      <xs:choice>
        <xs:element ref="tns:messageResourcesFactory"/>
        <xs:element ref="tns:propertyMessageResourcesFactory"/>
      </xs:choice>
      <xs:element name="config" type="xs:string" minOccurs="0"/>
      <xs:choice>
        <xs:element ref="tns:messageResourcesFactory"/>
        <xs:element ref="tns:propertyMessageResourcesFactory"/>
      </xs:choice>
      <xs:element name="formats" type="ns1:slGenericHashMap"
minOccurs="0"/>
      <xs:element name="returnNull" type="xs:boolean"/>
      <xs:element name="escape" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>


----------------------------------


class MessageResources
  attr_accessor :messageResourcesFactory
  attr_accessor :propertyMessageResourcesFactory
  attr_accessor :config
  attr_accessor :messageResourcesFactory
  attr_accessor :propertyMessageResourcesFactory
  attr_accessor :formats
  attr_accessor :returnNull
  attr_accessor :escape

  def initialize(messageResourcesFactory = nil,
propertyMessageResourcesFactory = nil, config = nil,
messageResourcesFactory
= nil, propertyMessageResourcesFactory = nil, formats = nil, returnNull
=
nil, escape = nil)
    @messageResourcesFactory = messageResourcesFactory
    @propertyMessageResourcesFactory = propertyMessageResourcesFactory
    @config = config
    @messageResourcesFactory = messageResourcesFactory
    @propertyMessageResourcesFactory = propertyMessageResourcesFactory
    @formats = formats
    @returnNull = returnNull
    @escape = escape
  end
end
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2009-03-04 19:34
(Received via mailing list)
On Mar 4, 2009, at 10:23, David Jameson wrote:

> showstopper issue for us --- means we can't support  ruby, which we
> really
> want to do.

Did you file a bug or check the tracker to see if it has been fixed?

$ gem list -dr soap4r

*** REMOTE GEMS ***

soap4r (1.5.8)
     Author: NAKAMURA, Hiroshi
     Homepage: http://dev.ctor.org/soap4r

     An implementation of SOAP 1.1 for Ruby.

Try that link
59972505b46816ac6968bc7eeaaddb49?d=identicon&s=25 David Jameson (Guest)
on 2009-03-05 22:10
(Received via mailing list)
Thanks for responding --- the first thing I did was go to that page (I
was
already using 1.5.8) and noted that (a) there were quite a few bug
reports
there and (b) there have been no updates since 2007. I did not file a
bug
immediately because (since I'm not an expert), I wanted to first check
within the community to see if this was something already know, or
whether I
was doing something wrong (Always a possibilty).

D


"Eric Hodel" <drbrain@segment7.net> wrote in message
news:0FFBF395-B28D-46B3-920E-E3965B9D75EB@segment7.net...
This topic is locked and can not be replied to.