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

root/branches/1_5/lib/wsdl/soap/element.rb

Revision 1915, 0.7 kB (checked in by nahi, 1 year ago)
  • added support for anonymous type. anonymous type is mapped to inner class. closes #355.
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 # WSDL4R - XMLSchema element definition for WSDL.
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/xmlSchema/element'
10
11
12 module WSDL
13 module XMLSchema
14
15
16 class Element < Info
17   def map_as_array?
18     # parent sequence / choice may be marked as maxOccurs="unbounded"
19     maxoccurs.nil? or maxoccurs != 1 or (parent and parent.map_as_array?)
20   end
21
22   def anonymous_type?
23     !@ref and @name and @local_complextype
24   end
25
26   def attributes
27     @local_complextype.attributes
28   end
29 end
30
31
32 end
33 end
Note: See TracBrowser for help on using the browser.