Read more

Savon: Use complex SOAP types as arguments

Henning Koch
July 09, 2015Software engineer at makandra GmbH

If a SOAP API expects you to call a remote method with arguments of complex types, Savon Show archive.org snapshot lets you manually set the xsi:type attribute like this:

client.call(:rpc_method,
  message: {
    :some_object => {
      :name => 'foo',
      :other => 'bar',
      '@xsi:type' => 'somenamespace:SomeObject'
    }
  }
)
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This is roughly equivalent to this in Javaland, where you have magic generated stub code:

SomeObject so = new SomeObject();
so.setName('foo');
so.setOther('bar');
client.rpcMethod(so);
Posted by Henning Koch to makandra dev (2015-07-09 22:38)