Class: WSDL::Parser::OperationInfo Private
- Inherits:
-
Object
- Object
- WSDL::Parser::OperationInfo
- Defined in:
- lib/wsdl/parser/operation_info.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 operation with its binding and port type information.
This class combines information from the binding operation (protocol details) and port type operation (abstract interface) to provide a complete view of an operation that can be invoked.
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
private
The name of this operation.
Instance Method Summary collapse
-
#initialize(name, binding_operation, port_type_operation, documents:, schemas:, limits:, issues: nil, element_builder: nil) ⇒ OperationInfo
constructor
private
Creates a new OperationInfo instance.
-
#input ⇒ Input
private
Returns the input message definition for this operation.
-
#input? ⇒ Boolean
private
Returns whether the binding operation defines an input element.
-
#input_style ⇒ String
private
Returns the input style for this operation.
-
#output ⇒ Output?
private
Returns the output message definition for this operation.
-
#output_style ⇒ String?
private
Returns the output style for this operation.
-
#rpc_input_namespace ⇒ String?
private
Returns the RPC input namespace from the binding's input body.
-
#rpc_output_namespace ⇒ String?
private
Returns the RPC output namespace from the binding's output body.
-
#soap_action ⇒ String?
private
Returns the SOAP action for this operation.
-
#soap_version ⇒ String?
private
Returns the SOAP version for this operation.
Constructor Details
#initialize(name, binding_operation, port_type_operation, documents:, schemas:, limits:, issues: nil, element_builder: nil) ⇒ OperationInfo
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 OperationInfo instance.
rubocop:disable Metrics/ParameterLists -- per-operation + build context
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/wsdl/parser/operation_info.rb', line 25 def initialize(name, binding_operation, port_type_operation, documents:, schemas:, limits:, issues: nil, element_builder: nil) @name = name @binding_operation = binding_operation @port_type_operation = port_type_operation @documents = documents @schemas = schemas @limits = limits @issues = issues @element_builder = element_builder end |
Instance Attribute Details
#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 of this operation.
39 40 41 |
# File 'lib/wsdl/parser/operation_info.rb', line 39 def name @name end |
Instance Method Details
#input ⇒ Input
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 message definition for this operation.
The input contains the header and body parts that define the structure of request messages.
67 68 69 70 71 72 73 74 |
# File 'lib/wsdl/parser/operation_info.rb', line 67 def input @input ||= Input.new( @binding_operation, @port_type_operation, documents: @documents, schemas: @schemas, limits: @limits, issues: @issues, element_builder: @element_builder ) end |
#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 the binding operation defines an input element.
99 100 101 |
# File 'lib/wsdl/parser/operation_info.rb', line 99 def input? @binding_operation.input? end |
#input_style ⇒ 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 input style for this operation.
The style is a combination of the binding style and use attribute, such as 'document/literal' or 'rpc/literal'.
123 124 125 |
# File 'lib/wsdl/parser/operation_info.rb', line 123 def input_style "#{@binding_operation.style}/#{@binding_operation.input_body[:use]}" end |
#output ⇒ Output?
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 message definition for this operation.
The output contains the header and body parts that define the structure of response messages. Returns nil for one-way operations that have no output message.
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/wsdl/parser/operation_info.rb', line 83 def output return @output if defined?(@output) return unless @port_type_operation.output @output = Output.new( @binding_operation, @port_type_operation, documents: @documents, schemas: @schemas, limits: @limits, issues: @issues, element_builder: @element_builder ) end |
#output_style ⇒ 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 output style for this operation.
The style is a combination of the binding style and use attribute, such as 'document/literal' or 'rpc/literal'. Returns nil for one-way operations that have no output message.
134 135 136 137 138 139 |
# File 'lib/wsdl/parser/operation_info.rb', line 134 def output_style use = @binding_operation.output_body[:use] return unless use "#{@binding_operation.style}/#{use}" end |
#rpc_input_namespace ⇒ 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 RPC input namespace from the binding's input body.
106 107 108 |
# File 'lib/wsdl/parser/operation_info.rb', line 106 def rpc_input_namespace @binding_operation.input_body[:namespace] end |
#rpc_output_namespace ⇒ 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 RPC output namespace from the binding's output body.
113 114 115 |
# File 'lib/wsdl/parser/operation_info.rb', line 113 def rpc_output_namespace @binding_operation.output_body[:namespace] end |
#soap_action ⇒ 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 SOAP action for this operation.
The SOAP action is typically used as an HTTP header value to indicate the intent of the SOAP request.
47 48 49 |
# File 'lib/wsdl/parser/operation_info.rb', line 47 def soap_action @binding_operation.soap_action end |
#soap_version ⇒ 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 SOAP version for this operation.
54 55 56 57 58 59 |
# File 'lib/wsdl/parser/operation_info.rb', line 54 def soap_version case @binding_operation.soap_namespace when NS::WSDL_SOAP_1_1 then '1.1' when NS::WSDL_SOAP_1_2 then '1.2' end end |