Class: SOAP::WSDL::Message
- Inherits:
-
Object
- Object
- SOAP::WSDL::Message
- Defined in:
- lib/soap/lc/wsdl/message.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
Instance Method Summary collapse
-
#initialize(element) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(element) ⇒ Message
Returns a new instance of Message.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/soap/lc/wsdl/message.rb', line 10 def initialize( element ) @parts = Hash.new @name = element.attributes['name'] # Process all parts element.find_all {|e| e.class == REXML::Element }.each { |part| case part.name when "part" @parts[part.attributes['name']] = Hash.new # Store part attributs part.attributes.each { |name, value| case name when 'name' @parts[part.attributes['name']][:name] = value when 'element' @parts[part.attributes['name']][:element] = value @parts[part.attributes['name']][:mode] = :element when 'type' @parts[part.attributes['name']][:type] = value @parts[part.attributes['name']][:mode] = :type else warn "Ignoring attribut `#{name}' in part `#{part.attributes['name']}' for message `#{element.attributes['name']}'" end } else warn "Ignoring element `#{part.name}' in message `#{element.attributes['name']}'" end } end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/soap/lc/wsdl/message.rb', line 8 def name @name end |
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
7 8 9 |
# File 'lib/soap/lc/wsdl/message.rb', line 7 def parts @parts end |