0

Using Rails washout I have a class as a complex type

class Hdr < WashOut::Type
  map :Hdr => {
        :Timestamp => :datetime,
        ...
      }
end

class HdrContainer < WashOut::Type
  type_name 'Hdr_con'
  map :Hdr => Hdr
end

And I use it as follows

  soap_action "DEL",
              :args   => {  :Hdr => Hdr,
                            ...

However this produces

  <ns:DEL soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <Hdr xsi:type="ns:hdr">
        <Hdr xsi:type="ns:Hdr">
           <Timestamp xsi:type="xsd:dateTime">...</Timestamp>

What can I do to not have an Hdr element inside another Hdr? I am looking for my defined Hdr type to be a direct child of the DEL element

Sash
  • 4,448
  • 1
  • 17
  • 31

1 Answers1

1
class Hdr < WashOut::Type
  map :Hdr => {
        :Timestamp => :datetime,
        ...
      }
end

Can be changed to:

class Hdr < WashOut::Type
  map 
        :Timestamp => :datetime,
        ...
end

This will remove the extra level

Sash
  • 4,448
  • 1
  • 17
  • 31