Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/lib/wsdl/message.rb

Revision 1824, 0.9 kB (checked in by nahi, 2 years ago)
  • Copyright notice updated. add '2000-2007' uniformly.
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 # WSDL4R - WSDL message definition.
2 # Copyright (C) 2000-2007  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
3
4 # This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
5 # redistribute it and/or modify it under the same terms of Ruby's license;
6 # either the dual license version in 2003, or any later version.
7
8
9 require 'wsdl/info'
10
11
12 module WSDL
13
14
15 class Message < Info
16   attr_reader :name     # required
17   attr_reader :parts
18
19   def initialize
20     super
21     @name = nil
22     @parts = []
23   end
24
25   def targetnamespace
26     parent.targetnamespace
27   end
28
29   def parse_element(element)
30     case element
31     when PartName
32       o = Part.new
33       @parts << o
34       o
35     when DocumentationName
36       o = Documentation.new
37       o
38     else
39       nil
40     end
41   end
42
43   def parse_attr(attr, value)
44     case attr
45     when NameAttrName
46       @name = XSD::QName.new(parent.targetnamespace, value.source)
47     else
48       nil
49     end
50   end
51 end
52
53
54 end
Note: See TracBrowser for help on using the browser.