Sha256: 97d6676428a7d6c6cd1373733d6f9f2668b1ef9402a4e39724f87d311f5f254e

Contents?: true

Size: 449 Bytes

Versions: 5

Compression:

Stored size: 449 Bytes

Contents

# encoding: ASCII-8BIT
require 'soap/marshal'

class IntArray < Array; end

map = SOAP::Mapping::Registry.new
map.add(
  IntArray, SOAP::SOAPArray, SOAP::Mapping::Registry::TypedArrayFactory,
  {
    :type => XSD::QName.new(XSD::Namespace, XSD::IntLiteral)
  }
)

puts "== dumps anyType array =="
puts SOAP::Marshal.marshal(IntArray[1, 2, 3])
puts
puts "== dumps int array with custom registry =="
puts SOAP::Marshal.marshal(IntArray[1, 2, 3], map)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
soap5r-2.0.3 sample/marshal/customregistry.rb
soap5r-2.0.2 sample/marshal/customregistry.rb
soap5r-2.0.1 sample/marshal/customregistry.rb
soap5r-2.0.0 sample/marshal/customregistry.rb
soap5r-2.0.0.20120130130121 sample/marshal/customregistry.rb