Class: WSDL::Message

Inherits:
Info show all
Defined in:
lib/wsdl/message.rb

Instance Attribute Summary collapse

Attributes inherited from Info

#id, #parent, #root

Instance Method Summary collapse

Methods inherited from Info

#inspect, #parse_epilogue

Constructor Details

#initializeMessage

Returns a new instance of Message.



20
21
22
23
24
# File 'lib/wsdl/message.rb', line 20

def initialize
  super
  @name = nil
  @parts = []
end

Instance Attribute Details

#nameObject (readonly)

required



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

def name
  @name
end

#partsObject (readonly)

Returns the value of attribute parts.



18
19
20
# File 'lib/wsdl/message.rb', line 18

def parts
  @parts
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object



44
45
46
47
48
49
50
51
# File 'lib/wsdl/message.rb', line 44

def parse_attr(attr, value)
  case attr
  when NameAttrName
    @name = XSD::QName.new(parent.targetnamespace, value.source)
  else
    nil
  end
end

#parse_element(element) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/wsdl/message.rb', line 30

def parse_element(element)
  case element
  when PartName
    o = Part.new
    @parts << o
    o
  when DocumentationName
    o = Documentation.new
    o
  else
    nil
  end
end

#targetnamespaceObject



26
27
28
# File 'lib/wsdl/message.rb', line 26

def targetnamespace
  parent.targetnamespace
end