Forum: Ruby on Rails HELP!! - Problem with AWS and subclasses

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dirk B. (Guest)
on 2006-01-11 11:16

I'm quite new to Rails and have a problem with the use of AWS.

The Problem is, that I have a class which provides some basic attributes
and some subclasses of this with more specific attributes. I want to
send objects of those classes through SOAP by a remote client, but if I
specify just the base class in the method signature of my API definition
the generated WSDL file will just include the attributes of the base

Is there any way to change this behavior? Because it is possible. The
Apache AXIS tools for example will generate a WSDL containing the class
inheritance so that remote callers are aware of this feature.

Thanks for your help.



Here is an example of what I mean for better illustration:

class Shape < ActionWebService::Struct
  member :color, :string

class Square < Shape
  member :length, :int

class Circle < Shape
  member :radius, :int

class Rectangle < Square
  member :height, :int

class ShapeApi < ActionWebService::API::Base
  api_method :store_shape,
             :expects => [Shape]


<xsd:complexType name="Shape">
    <xsd:element name="color_id" type="xsd:string"/>
This topic is locked and can not be replied to.