Class: LolSoap::Envelope
- Inherits:
-
Object
- Object
- LolSoap::Envelope
- Defined in:
- lib/lolsoap/envelope.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#wsdl ⇒ Object
readonly
Returns the value of attribute wsdl.
Instance Method Summary collapse
- #action ⇒ Object
-
#body(klass = Builder) {|builder| ... } ⇒ Object
Build the body of the envelope.
- #endpoint ⇒ Object
-
#header(klass = Builder) {|builder| ... } ⇒ Object
Build the header of the envelope.
-
#initialize(wsdl, operation, doc = Nokogiri::XML::Document.new) ⇒ Envelope
constructor
A new instance of Envelope.
- #input_type ⇒ Object
- #output_type ⇒ Object
- #soap_namespace ⇒ Object
- #soap_prefix ⇒ Object
- #to_xml ⇒ Object
Constructor Details
#initialize(wsdl, operation, doc = Nokogiri::XML::Document.new) ⇒ Envelope
Returns a new instance of Envelope.
14 15 16 17 18 19 20 |
# File 'lib/lolsoap/envelope.rb', line 14 def initialize(wsdl, operation, doc = Nokogiri::XML::Document.new) @wsdl = wsdl @operation = operation @doc = doc initialize_doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
6 7 8 |
# File 'lib/lolsoap/envelope.rb', line 6 def doc @doc end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
6 7 8 |
# File 'lib/lolsoap/envelope.rb', line 6 def operation @operation end |
#wsdl ⇒ Object (readonly)
Returns the value of attribute wsdl.
6 7 8 |
# File 'lib/lolsoap/envelope.rb', line 6 def wsdl @wsdl end |
Instance Method Details
#action ⇒ Object
45 46 47 |
# File 'lib/lolsoap/envelope.rb', line 45 def action operation.action end |
#body(klass = Builder) {|builder| ... } ⇒ Object
Build the body of the envelope
28 29 30 31 32 |
# File 'lib/lolsoap/envelope.rb', line 28 def body(klass = Builder) builder = klass.new(input, operation.input) yield builder if block_given? builder end |
#endpoint ⇒ Object
41 42 43 |
# File 'lib/lolsoap/envelope.rb', line 41 def endpoint wsdl.endpoint end |
#header(klass = Builder) {|builder| ... } ⇒ Object
Build the header of the envelope
35 36 37 38 39 |
# File 'lib/lolsoap/envelope.rb', line 35 def header(klass = Builder) builder = klass.new(@header) yield builder if block_given? builder end |
#input_type ⇒ Object
49 50 51 |
# File 'lib/lolsoap/envelope.rb', line 49 def input_type operation.input end |
#output_type ⇒ Object
53 54 55 |
# File 'lib/lolsoap/envelope.rb', line 53 def output_type operation.output end |
#soap_namespace ⇒ Object
65 66 67 |
# File 'lib/lolsoap/envelope.rb', line 65 def soap_namespace SOAP_NAMESPACE end |
#soap_prefix ⇒ Object
61 62 63 |
# File 'lib/lolsoap/envelope.rb', line 61 def soap_prefix SOAP_PREFIX end |
#to_xml ⇒ Object
57 58 59 |
# File 'lib/lolsoap/envelope.rb', line 57 def to_xml doc.to_xml end |