Class: WSDL::Parser::PortTypeOperation Private

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl/parser/port_type_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 portType operation element.

A port type operation defines an abstract operation as part of a port type interface. It specifies the input and output messages that define the operation's interface contract, independent of any protocol binding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation_node, namespaces: nil) ⇒ PortTypeOperation

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 PortTypeOperation from a WSDL operation XML node.

Parameters:

  • operation_node (Nokogiri::XML::Node)

    the wsdl:operation element within a portType

  • namespaces (Hash{String => String}, nil) (defaults to: nil)

    pre-resolved namespace declarations shared across sibling operations under the same portType



20
21
22
23
24
25
26
27
# File 'lib/wsdl/parser/port_type_operation.rb', line 20

def initialize(operation_node, namespaces: nil)
  @operation_node = operation_node
  @namespaces = namespaces

  @name = operation_node['name']
  @input_node = find_node('input')
  @output_node = find_node('output')
end

Instance Attribute Details

#nameString (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.

Returns:

  • (String)

    the name of this operation



30
31
32
# File 'lib/wsdl/parser/port_type_operation.rb', line 30

def name
  @name
end

Instance Method Details

#inputMessageReference

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.

Examples:

operation.input
# => #<data WSDL::Parser::MessageReference ...>

Returns:



47
48
49
50
51
# File 'lib/wsdl/parser/port_type_operation.rb', line 47

def input
  return @input if defined? @input

  @input = @input_node ? parse_node(@input_node) : nil
end

#input_nameString?

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 element.

Used by OperationMap for overload disambiguation.

Returns:

  • (String, nil)

    the input name, or nil if not specified



37
38
39
# File 'lib/wsdl/parser/port_type_operation.rb', line 37

def input_name
  input&.name
end

#outputMessageReference

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.

Examples:

operation.output
# => #<data WSDL::Parser::MessageReference ...>

Returns:



59
60
61
62
63
# File 'lib/wsdl/parser/port_type_operation.rb', line 59

def output
  return @output if defined? @output

  @output = @output_node ? parse_node(@output_node) : nil
end