Class: WSDL::Parser::MessageInfo Private

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

A message in WSDL defines the abstract structure of data being exchanged. It consists of one or more parts, each of which may reference an XML Schema type or element.

Instance Method Summary collapse

Constructor Details

#initialize(message_node) ⇒ MessageInfo

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 MessageInfo from a WSDL message XML node.

Parameters:

  • message_node (Nokogiri::XML::Node)

    the wsdl:message element



17
18
19
# File 'lib/wsdl/parser/message_info.rb', line 17

def initialize(message_node)
  @message_node = message_node
end

Instance Method Details

#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 of this message.

Returns:

  • (String)

    the message name



24
25
26
# File 'lib/wsdl/parser/message_info.rb', line 24

def name
  @message_node['name']
end

#partsArray<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 parts defined in this message.

Each part is a Hash with the following keys:

  • :name - the part name
  • :type - the qualified type name (if using type attribute)
  • :element - the qualified element name (if using element attribute)
  • :namespaces - the namespace declarations in scope

Returns:

  • (Array<Hash>)

    the message parts



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

def parts
  @parts ||= parts!
end