Class: G4sNamespaceFilter

Inherits:
SOAP::Filter::Handler
  • Object
show all
Defined in:
lib/g4s/headers/g4s_namespace_filter.rb

Overview

replaces ‘env:’ with ‘soap12:’

Instance Method Summary collapse

Constructor Details

#initializeG4sNamespaceFilter

Returns a new instance of G4sNamespaceFilter.



16
17
18
19
20
21
22
23
24
# File 'lib/g4s/headers/g4s_namespace_filter.rb', line 16

def initialize
  @default_ns = SOAP::NS.new
  @default_ns.assign(SOAP::EnvelopeNamespace,"soap12")
  #@default_ns.assign('http://www.w3.org/2003/05/soap-envelope',"soap12")  # adding this in breaks soap12, makes it become env again.
  #@default_ns.assign('http://wstest._2organize.nl','tms')
  #@default_ns.assign('http://schemas.xmlsoap.org/soap/encoding/','soapenc')
  @default_ns.assign('http://www.w3.org/2001/XMLSchema','xsd')
  @default_ns.assign('http://www.w3.org/2001/XMLSchema-instance','xsi')
end

Instance Method Details

#on_outbound(envelope, opt) ⇒ Object



11
12
13
14
# File 'lib/g4s/headers/g4s_namespace_filter.rb', line 11

def on_outbound(envelope, opt)
  opt[:default_ns] = @default_ns
  envelope
end