Class: WSDL::Parser::BindingOperation Private
- Inherits:
-
Object
- Object
- WSDL::Parser::BindingOperation
- Defined in:
- lib/wsdl/parser/binding_operation.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a WSDL binding operation element.
A binding operation defines the protocol-specific details for a particular operation, including the SOAP action, style, and the format of input/output messages (headers and body).
Constant Summary collapse
- EMPTY_NODES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Shared empty frozen array used as default for header node lists.
[].freeze
Instance Attribute Summary collapse
-
#input_name ⇒ String?
readonly
private
The name attribute of the input wrapper element.
-
#output_name ⇒ String?
readonly
private
The name attribute of the output wrapper element.
-
#soap_action ⇒ String?
readonly
private
The SOAPAction HTTP header value.
-
#soap_namespace ⇒ String
readonly
private
The SOAP namespace URI (1.1 or 1.2).
-
#style ⇒ String
readonly
private
The operation style ('document' or 'rpc').
Instance Method Summary collapse
-
#initialize(operation_node, defaults = {}) ⇒ BindingOperation
constructor
private
Creates a new BindingOperation from a WSDL operation XML node.
-
#input? ⇒ Boolean
private
Returns whether this binding operation has an input element.
-
#input_body ⇒ Hash
private
Returns the input body definition for this operation.
-
#input_headers ⇒ Array<HeaderReference>
private
Returns the input header definitions for this operation.
-
#name ⇒ String
private
Returns the name of this operation.
-
#output_body ⇒ Hash
private
Returns the output body definition for this operation.
-
#output_headers ⇒ Array<HeaderReference>
private
Returns the output header definitions for this operation.
Constructor Details
#initialize(operation_node, defaults = {}) ⇒ BindingOperation
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new BindingOperation from a WSDL operation XML node.
Categorizes all child elements in a single pass to avoid repeated Nokogiri element_children traversals and node_name allocations.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/wsdl/parser/binding_operation.rb', line 27 def initialize(operation_node, defaults = {}) @operation_node = operation_node @has_input = false @input_body_node = nil @input_header_nodes = EMPTY_NODES @output_body_node = nil @output_header_nodes = EMPTY_NODES categorize_children!(defaults) end |
Instance Attribute Details
#input_name ⇒ String? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the name attribute of the input wrapper element.
48 49 50 |
# File 'lib/wsdl/parser/binding_operation.rb', line 48 def input_name @input_name end |
#output_name ⇒ String? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the name attribute of the output wrapper element.
51 52 53 |
# File 'lib/wsdl/parser/binding_operation.rb', line 51 def output_name @output_name end |
#soap_action ⇒ String? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the SOAPAction HTTP header value.
39 40 41 |
# File 'lib/wsdl/parser/binding_operation.rb', line 39 def soap_action @soap_action end |
#soap_namespace ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the SOAP namespace URI (1.1 or 1.2).
45 46 47 |
# File 'lib/wsdl/parser/binding_operation.rb', line 45 def soap_namespace @soap_namespace end |
#style ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the operation style ('document' or 'rpc').
42 43 44 |
# File 'lib/wsdl/parser/binding_operation.rb', line 42 def style @style end |
Instance Method Details
#input? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns whether this binding operation has an input element.
63 64 65 |
# File 'lib/wsdl/parser/binding_operation.rb', line 63 def input? @has_input end |
#input_body ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the input body definition for this operation.
The body is represented as a Hash with keys:
:encoding_style- the encoding style URI:namespace- the namespace URI for RPC-style messages:use- 'literal' or 'encoded'
89 90 91 |
# File 'lib/wsdl/parser/binding_operation.rb', line 89 def input_body @input_body ||= build_body(@input_body_node) end |
#input_headers ⇒ Array<HeaderReference>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the input header definitions for this operation.
Each header is represented as a Hash with keys:
encoding_style- the encoding style URInamespace- the namespace URIuse- 'literal' or 'encoded'message- the message name (qualified)part- the part name within the message
77 78 79 |
# File 'lib/wsdl/parser/binding_operation.rb', line 77 def input_headers @input_headers ||= @input_header_nodes.map { |node| HeaderReference.from_node(node) } end |
#name ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the name of this operation.
56 57 58 |
# File 'lib/wsdl/parser/binding_operation.rb', line 56 def name @operation_node['name'] end |
#output_body ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the output body definition for this operation.
The body is represented as a Hash with keys:
:encoding_style- the encoding style URI:namespace- the namespace URI for RPC-style messages:use- 'literal' or 'encoded'
115 116 117 |
# File 'lib/wsdl/parser/binding_operation.rb', line 115 def output_body @output_body ||= build_body(@output_body_node) end |
#output_headers ⇒ Array<HeaderReference>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the output header definitions for this operation.
Each header is represented as a Hash with keys:
encoding_style- the encoding style URInamespace- the namespace URIuse- 'literal' or 'encoded'message- the message name (qualified)part- the part name within the message
103 104 105 |
# File 'lib/wsdl/parser/binding_operation.rb', line 103 def output_headers @output_headers ||= @output_header_nodes.map { |node| HeaderReference.from_node(node) } end |