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).
Instance Attribute Summary collapse
-
#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_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.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/wsdl/parser/binding_operation.rb', line 19 def initialize(operation_node, defaults = {}) @operation_node = operation_node if (soap_operation_node = find_soap_operation_node) namespace = soap_operation_node.first node = soap_operation_node.last @soap_namespace = namespace @soap_action = node['soapAction'] @style = node['style'] || defaults[:style] end end |
Instance Attribute Details
#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.
33 34 35 |
# File 'lib/wsdl/parser/binding_operation.rb', line 33 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).
39 40 41 |
# File 'lib/wsdl/parser/binding_operation.rb', line 39 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').
36 37 38 |
# File 'lib/wsdl/parser/binding_operation.rb', line 36 def style @style end |
Instance Method Details
#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'
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/wsdl/parser/binding_operation.rb', line 73 def input_body return @input_body if @input_body input_body = {} if (body_node = find_input_child_nodes('body').first) input_body = { encoding_style: body_node['encodingStyle'], namespace: body_node['namespace'], use: body_node['use'] } end @input_body = input_body 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
58 59 60 61 62 63 |
# File 'lib/wsdl/parser/binding_operation.rb', line 58 def input_headers return @input_headers if @input_headers header_nodes = find_input_child_nodes('header') || [] @input_headers = build_headers(header_nodes) 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.
44 45 46 |
# File 'lib/wsdl/parser/binding_operation.rb', line 44 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'
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/wsdl/parser/binding_operation.rb', line 114 def output_body return @output_body if @output_body output_body = {} if (body_node = find_output_child_nodes('body').first) output_body = { encoding_style: body_node['encodingStyle'], namespace: body_node['namespace'], use: body_node['use'] } end @output_body = output_body 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
99 100 101 102 103 104 |
# File 'lib/wsdl/parser/binding_operation.rb', line 99 def output_headers return @output_headers if @output_headers header_nodes = find_output_child_nodes('header') || [] @output_headers = build_headers(header_nodes) end |