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 ⇒ Object
- #input_body ⇒ Object
- #input_body_content ⇒ Object
- #input_body_content_type ⇒ Object
- #input_header ⇒ Object
- #input_header_content ⇒ Object
- #input_header_content_type ⇒ Object
- #output ⇒ Object
- #output_body ⇒ Object
- #output_body_content ⇒ Object
- #output_body_content_type ⇒ Object
- #output_header ⇒ Object
- #output_header_type ⇒ Object
- #soap_namespace ⇒ Object
- #soap_prefix ⇒ Object
- #soap_version ⇒ Object
- #to_xml(options = {}) ⇒ 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(body_content, input_body_content_type) 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_content, input_header_content_type) yield builder if block_given? builder end |
#input ⇒ Object
49 50 51 |
# File 'lib/lolsoap/envelope.rb', line 49 def input operation.input end |
#input_body ⇒ Object
65 66 67 |
# File 'lib/lolsoap/envelope.rb', line 65 def input_body input.body end |
#input_body_content ⇒ Object
69 70 71 |
# File 'lib/lolsoap/envelope.rb', line 69 def input_body_content input_body.content end |
#input_body_content_type ⇒ Object
73 74 75 |
# File 'lib/lolsoap/envelope.rb', line 73 def input_body_content_type input_body.content_type end |
#input_header ⇒ Object
53 54 55 |
# File 'lib/lolsoap/envelope.rb', line 53 def input_header input.header end |
#input_header_content ⇒ Object
57 58 59 |
# File 'lib/lolsoap/envelope.rb', line 57 def input_header_content input_header.content end |
#input_header_content_type ⇒ Object
61 62 63 |
# File 'lib/lolsoap/envelope.rb', line 61 def input_header_content_type input_header.content_type end |
#output ⇒ Object
77 78 79 |
# File 'lib/lolsoap/envelope.rb', line 77 def output operation.output end |
#output_body ⇒ Object
89 90 91 |
# File 'lib/lolsoap/envelope.rb', line 89 def output_body output.body end |
#output_body_content ⇒ Object
93 94 95 |
# File 'lib/lolsoap/envelope.rb', line 93 def output_body_content output_body.content end |
#output_body_content_type ⇒ Object
97 98 99 |
# File 'lib/lolsoap/envelope.rb', line 97 def output_body_content_type output_body.content_type end |
#output_header ⇒ Object
81 82 83 |
# File 'lib/lolsoap/envelope.rb', line 81 def output_header output.header end |
#output_header_type ⇒ Object
85 86 87 |
# File 'lib/lolsoap/envelope.rb', line 85 def output_header_type output_header && output_header.type end |
#soap_namespace ⇒ Object
109 110 111 |
# File 'lib/lolsoap/envelope.rb', line 109 def soap_namespace soap_version == '1.2' ? SOAP_1_2 : SOAP_1_1 end |
#soap_prefix ⇒ Object
105 106 107 |
# File 'lib/lolsoap/envelope.rb', line 105 def soap_prefix 'soap' end |
#soap_version ⇒ Object
113 114 115 |
# File 'lib/lolsoap/envelope.rb', line 113 def soap_version wsdl.soap_version end |
#to_xml(options = {}) ⇒ Object
101 102 103 |
# File 'lib/lolsoap/envelope.rb', line 101 def to_xml( = {}) doc.to_xml() end |