Sha256: 4a296a9209f4c5fdfca7074c4dec15647281de6450cc299465083139c61c3268

Contents?: true

Size: 655 Bytes

Versions: 5

Compression:

Stored size: 655 Bytes

Contents

# encoding: ASCII-8BIT
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

5 entries across 5 versions & 1 rubygems

Version Path
soap5r-2.0.3 sample/soapheader/soapext_basicauth/client.rb
soap5r-2.0.2 sample/soapheader/soapext_basicauth/client.rb
soap5r-2.0.1 sample/soapheader/soapext_basicauth/client.rb
soap5r-2.0.0 sample/soapheader/soapext_basicauth/client.rb
soap5r-2.0.0.20120130130121 sample/soapheader/soapext_basicauth/client.rb