Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #355 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

let wsdl2ruby.rb support stub class generation of XML anonymous type

Reported by: nahi Assigned to: nahi
Priority: normal Milestone: 1.5.8
Component: wsdl4r Version: 1.5
Keywords: Cc:

Description

For now, wsdl2ruby.rb does not support stub class generation of XML Schema anonymous type.

What should be generated by wsdl2ruby.rb ?

> >   <xs:element name="Air_MultiAvailability">
> >     <xs:complexType>
> >       <xs:sequence>
> >         <xs:element name="messageActionDetails">
> >           <xs:complexType>
> >             <xs:sequence>
> >               <xs:element name="functionDetails">
> >                 <xs:complexType>
> >                   <xs:sequence>

class Air_MultiAvailability
  class MessageActionDetails
    class FunctionDetails
      ...
    end
  end
end

?

Change History

06/08/07 12:48:03 changed by nahi

  • milestone changed from undefined to 1.5.7.

06/30/07 12:47:21 changed by nahi

  • milestone changed from 1.5.7 to undefined.

07/02/07 23:48:17 changed by nahi

  • priority changed from normal to high.

07/18/07 15:31:56 changed by nahi

  • priority changed from high to normal.
  • milestone changed from undefined to 1.5.8.

08/05/07 23:25:22 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1915]) * added support for anonymous type. anonymous type is mapped to inner class. closes #355.

09/01/07 22:37:10 changed by nahi

  • status changed from closed to reopened.
  • resolution deleted.

from soap4r-ml

  <xs:complexType name="ExtraInfo">
    <xs:annotation>
      <xs:documentation>Service specific information.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="Entry">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Key" type="xs:string"/>
            <xs:element name="Value" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

and here is what wsd2ruby generates:

class ExtraInfo < ::Array
end

No classes defined for Entry, Key and Value. I think that wsdl2ruby
still has some room for improvements here...

09/03/07 22:41:06 changed by nahi

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [1934]) * anonymous class support was incomplete for Array type complexType. for literal registry, scan inside of Array like complexType. closes #355.

09/08/07 23:23:27 changed by nahi

  • status changed from closed to reopened.
  • resolution deleted.

[1934] generates;

class ExtraInfo
  class Entry

but the class ExtraInfo::Entry should be a subclass of String.

09/08/07 23:42:12 changed by nahi

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [1944]) * incomplete anonymous complexType support (simpleContent wrongly mapped to a generic class). closes #355.

09/12/07 15:03:07 changed by nahi

  • status changed from closed to reopened.
  • resolution deleted.

from soap4r-ml

I had several issues with the past versions, so I have tested RC3,
hoping that they could be solved. Indeed, all my known issues are
solved in RC3, but two new issues have appeared. Both are incorrect
entries in the mapping registry generated by wsdl2ruby.

First issue is that Pack::Header in incorrectly used where
Envelope::Header should be used.

Second issue is that MmsMessage::Recipients::RecipientType is
referenced (this class is not generated) instead of RecipientType
(this class is generated).

You can use the wsdl and schemas I send you earlier to verify this
problem. Simply ruby wsdl2ruby --wsdlwsdl.xml --type client and see
yourself. I am attaching both the incorrectly generated mapping
registry and my corrected version.


Leoš Bitto

09/12/07 15:05:30 changed by nahi

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [1954]) * mapping_registry was not generated propery for anonymous complexTypes which have the same NCname. closes #355.

09/21/07 18:22:47 changed by nahi

  • status changed from closed to reopened.
  • resolution deleted.

when there are 2 unqualified anonymous elements which have the same name in a SOAP message, mapper cannot decode it to the correct object.

09/21/07 18:25:51 changed by nahi

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [1979]) * when there are 2 unqualified anonymous elements which have the same name in a SOAP message, mapper cannot decode it to the correct object. introduced :is_anonymous in mapping_registry and do not search registry with anonymous element. closes #355.