Class: SOAP::Header::Handler
- Defined in:
- lib/action_web_service/soap/header/handler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#elename ⇒ Object
readonly
Returns the value of attribute elename.
-
#encodingstyle ⇒ Object
readonly
Returns the value of attribute encodingstyle.
-
#mustunderstand ⇒ Object
readonly
Returns the value of attribute mustunderstand.
Instance Method Summary collapse
-
#initialize(elename) ⇒ Handler
constructor
A new instance of Handler.
-
#on_inbound(header, mustunderstand = false) ⇒ Object
Given header is a SOAPHeaderItem or nil.
- #on_inbound_headeritem(header) ⇒ Object
-
#on_outbound ⇒ Object
Should return a SOAP/OM, a SOAPHeaderItem or nil.
- #on_outbound_headeritem ⇒ Object
Constructor Details
#initialize(elename) ⇒ Handler
Returns a new instance of Handler.
21 22 23 24 25 |
# File 'lib/action_web_service/soap/header/handler.rb', line 21 def initialize(elename) @elename = elename @mustunderstand = false @encodingstyle = nil end |
Instance Attribute Details
#elename ⇒ Object (readonly)
Returns the value of attribute elename.
17 18 19 |
# File 'lib/action_web_service/soap/header/handler.rb', line 17 def elename @elename end |
#encodingstyle ⇒ Object (readonly)
Returns the value of attribute encodingstyle.
19 20 21 |
# File 'lib/action_web_service/soap/header/handler.rb', line 19 def encodingstyle @encodingstyle end |
#mustunderstand ⇒ Object (readonly)
Returns the value of attribute mustunderstand.
18 19 20 |
# File 'lib/action_web_service/soap/header/handler.rb', line 18 def mustunderstand @mustunderstand end |
Instance Method Details
#on_inbound(header, mustunderstand = false) ⇒ Object
Given header is a SOAPHeaderItem or nil.
33 34 35 |
# File 'lib/action_web_service/soap/header/handler.rb', line 33 def on_inbound(header, mustunderstand = false) # do something. end |
#on_inbound_headeritem(header) ⇒ Object
50 51 52 |
# File 'lib/action_web_service/soap/header/handler.rb', line 50 def on_inbound_headeritem(header) on_inbound(header.element, header.mustunderstand) end |
#on_outbound ⇒ Object
Should return a SOAP/OM, a SOAPHeaderItem or nil.
28 29 30 |
# File 'lib/action_web_service/soap/header/handler.rb', line 28 def on_outbound nil end |
#on_outbound_headeritem ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/action_web_service/soap/header/handler.rb', line 37 def on_outbound_headeritem item = on_outbound if item.nil? nil elsif item.is_a?(::SOAP::SOAPHeaderItem) item.elename = @elename item else item.elename = @elename ::SOAP::SOAPHeaderItem.new(item, @mustunderstand, @encodingstyle) end end |