Class: WSDL::Message

Inherits:
Info show all
Defined in:
lib/action_web_service/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.



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

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

Instance Attribute Details

#nameObject (readonly)

required



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

def name
  @name
end

#partsObject (readonly)

Returns the value of attribute parts.



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

def parts
  @parts
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object



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

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



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

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



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

def targetnamespace
  parent.targetnamespace
end