Class: WSDL::Parser::HeaderReference Private

Inherits:
Data
  • Object
show all
Defined in:
lib/wsdl/parser/header_reference.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 soap:header/soap12:header message reference.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#encoding_styleObject (readonly)

Returns the value of attribute encoding_style

Returns:

  • (Object)

    the current value of encoding_style



8
9
10
# File 'lib/wsdl/parser/header_reference.rb', line 8

def encoding_style
  @encoding_style
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



8
9
10
# File 'lib/wsdl/parser/header_reference.rb', line 8

def message
  @message
end

#message_nameObject (readonly)

Returns the value of attribute message_name

Returns:

  • (Object)

    the current value of message_name



8
9
10
# File 'lib/wsdl/parser/header_reference.rb', line 8

def message_name
  @message_name
end

#namespaceObject (readonly)

Returns the value of attribute namespace

Returns:

  • (Object)

    the current value of namespace



8
9
10
# File 'lib/wsdl/parser/header_reference.rb', line 8

def namespace
  @namespace
end

#partObject (readonly)

Returns the value of attribute part

Returns:

  • (Object)

    the current value of part



8
9
10
# File 'lib/wsdl/parser/header_reference.rb', line 8

def part
  @part
end

#useObject (readonly)

Returns the value of attribute use

Returns:

  • (Object)

    the current value of use



8
9
10
# File 'lib/wsdl/parser/header_reference.rb', line 8

def use
  @use
end

Class Method Details

.from_node(header_node) ⇒ 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.

Builds a header reference from a SOAP header node.

Parameters:

  • header_node (Nokogiri::XML::Node)

    soap:header or soap12:header node

Returns:



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/wsdl/parser/header_reference.rb', line 14

def from_node(header_node)
  message = normalize_required_attribute(header_node['message'])
  part = normalize_required_attribute(header_node['part'])
  default_namespace = QName.document_namespace(header_node.document.root)
  message_name = (QName.parse(message, namespaces: header_node.namespaces, default_namespace:) if message)

  new(
    encoding_style: header_node['encodingStyle'],
    namespace: header_node['namespace'],
    use: header_node['use'],
    message:,
    part:,
    message_name:
  )
end