ActionWebService::Struct --> minOccurs?


In extending ActionWebService::Struct and naming members, is it possible
to indicate them as optional (yielding minOccurs=“0” in the wsdl)? For
example, suppose I want to create a request object that can either work
via a number id or a string name (think of it as a union).

class Identifier < ActionWebService::Struct
member :id, :int
member :name, :string

>xsd:complexType name=“Identifier”<
>xsd:element name=“id” type=“xsd:int”/<
>xsd:element name=“name” type=“xsd:string”/<

but I want something like:

>xsd:complexType name=“Identifier”<
>xsd:element name=“id” type=“xsd:int” minOccurs=“0”
>xsd:element name=“name” type=“xsd:string” minOccurs=“0”

And when I receive my Identifier object in code, I can call to know if a member was specified.

I don’t think this is possible, but I thought I’d ask. :^)


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs