Class: Handsoap::XmlMason::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/jiraSOAP/handsoap_extensions.rb

Overview

TODO:

Push these upstream?

Some simple extensions to Handsoap to make building SOAP messages easier.

Instance Method Summary collapse

Instance Method Details

#add_complex_array(node_name, array = [], options = {}) ⇒ Object

TODO:

Make this method recursive

Parameters:

  • node_name (String)
  • array (Array) (defaults to: [])
  • options (Hash) (defaults to: {})


24
25
26
27
28
# File 'lib/jiraSOAP/handsoap_extensions.rb', line 24

def add_complex_array node_name, array = [], options = {}
  prefix, name = parse_ns(node_name)
  node = append_child Handsoap::XmlMason::Element.new(self, prefix, name, nil, options)
  array.each { |element| element.soapify_for node, name }
end

#add_simple_array(node_name, array = [], options = {}) ⇒ Object

TODO:

Make this method recursive

Parameters:

  • node_name (String)
  • array (Array) (defaults to: [])
  • options (Hash) (defaults to: {})


12
13
14
15
16
# File 'lib/jiraSOAP/handsoap_extensions.rb', line 12

def add_simple_array node_name, array = [], options = {}
  prefix, name = parse_ns(node_name)
  node = append_child Handsoap::XmlMason::Element.new(self, prefix, name, nil, options)
  array.each { |element| node.add node_name, element }
end