Sha256: 893e85f4d1e80239cb024b9810efcb5d167833772de0f2a6c533149dec5b4629

Contents?: true

Size: 632 Bytes

Versions: 7

Compression:

Stored size: 632 Bytes

Contents

require 'soap/header/simplehandler'
require 'mms_MizGISDriver.rb'

class BasicAuthHeaderHandler < SOAP::Header::SimpleHandler
  MyHeaderName = XSD::QName.new('http://soap-authentication.org/basic/2001/10/', 'BasicAuth')

  def initialize(name, password)
    super(MyHeaderName)
    @name = name
    @password = password
  end

  def on_simple_outbound
    { 'Name' => @name, 'Password' => @password }
  end

  def on_simple_inbound(header, mustunderstand)
    p [header, mustunderstand]
  end
end

obj = Mms_MizGISPortType.new
obj.headerhandler << BasicAuthHeaderHandler.new('NaHi', 'HiNa')
obj.wiredump_dev = STDOUT
obj.getVersion

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
soap4r-spox-1.6.0 sample/soapheader/soapext_basicauth/client.rb
soap4r-ruby1.9-2.0.5 sample/soapheader/soapext_basicauth/client.rb
soap4r-ruby1.9-2.0.3 sample/soapheader/soapext_basicauth/client.rb
soap4r-ruby1.9-2.0.2 sample/soapheader/soapext_basicauth/client.rb
soap4r-ruby1.9-2.0.1 sample/soapheader/soapext_basicauth/client.rb
soap4r-ruby1.9-2.0.0 sample/soapheader/soapext_basicauth/client.rb
soap4r-ruby1.9-1.0.0 sample/soapheader/soapext_basicauth/client.rb