Changeset 1902
- Timestamp:
- 07/22/07 16:28:26 (1 year ago)
- Files:
-
- trunk/lib/soap/ns.rb (modified) (1 diff)
- trunk/lib/wsdl/info.rb (modified) (1 diff)
- trunk/lib/wsdl/xmlSchema/data.rb (modified) (3 diffs)
- trunk/lib/wsdl/xmlSchema/fractiondigits.rb (added)
- trunk/lib/wsdl/xmlSchema/length.rb (modified) (1 diff)
- trunk/lib/wsdl/xmlSchema/maxexclusive.rb (added)
- trunk/lib/wsdl/xmlSchema/maxinclusive.rb (added)
- trunk/lib/wsdl/xmlSchema/maxlength.rb (modified) (1 diff)
- trunk/lib/wsdl/xmlSchema/minexclusive.rb (added)
- trunk/lib/wsdl/xmlSchema/mininclusive.rb (added)
- trunk/lib/wsdl/xmlSchema/minlength.rb (modified) (1 diff)
- trunk/lib/wsdl/xmlSchema/simpleRestriction.rb (modified) (3 diffs)
- trunk/lib/wsdl/xmlSchema/totaldigits.rb (added)
- trunk/lib/wsdl/xmlSchema/whitespace.rb (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/ns.rb
r1898 r1902 9 9 require 'xsd/datatypes' 10 10 require 'xsd/ns' 11 require 'soap/soap' 11 12 12 13 trunk/lib/wsdl/info.rb
r1824 r1902 34 34 35 35 def parse_epilogue; end # abstract 36 37 private 38 39 def to_int(value) 40 Integer(value.source) 41 end 42 43 def to_boolean(value) 44 s = value.source 45 s == "true" or s == "1" 46 end 36 47 end 37 48 trunk/lib/wsdl/xmlSchema/data.rb
r1824 r1902 29 29 require 'wsdl/xmlSchema/union' 30 30 require 'wsdl/xmlSchema/unique' 31 32 require 'wsdl/xmlSchema/length' 33 require 'wsdl/xmlSchema/minlength' 34 require 'wsdl/xmlSchema/maxlength' 35 require 'wsdl/xmlSchema/pattern' 31 36 require 'wsdl/xmlSchema/enumeration' 32 require 'wsdl/xmlSchema/length' 33 require 'wsdl/xmlSchema/maxlength' 34 require 'wsdl/xmlSchema/minlength' 35 require 'wsdl/xmlSchema/pattern' 37 require 'wsdl/xmlSchema/whitespace' 38 require 'wsdl/xmlSchema/maxinclusive' 39 require 'wsdl/xmlSchema/maxexclusive' 40 require 'wsdl/xmlSchema/minexclusive' 41 require 'wsdl/xmlSchema/mininclusive' 42 require 'wsdl/xmlSchema/totaldigits' 43 require 'wsdl/xmlSchema/fractiondigits' 36 44 37 45 module WSDL … … 47 55 ComplexTypeName = XSD::QName.new(XSD::Namespace, 'complexType') 48 56 ElementName = XSD::QName.new(XSD::Namespace, 'element') 49 EnumerationName = XSD::QName.new(XSD::Namespace, 'enumeration')50 57 ExtensionName = XSD::QName.new(XSD::Namespace, 'extension') 51 58 ImportName = XSD::QName.new(XSD::Namespace, 'import') 52 59 IncludeName = XSD::QName.new(XSD::Namespace, 'include') 53 LengthName = XSD::QName.new(XSD::Namespace, 'length')54 60 ListName = XSD::QName.new(XSD::Namespace, 'list') 55 MaxLengthName = XSD::QName.new(XSD::Namespace, 'maxLength')56 MinLengthName = XSD::QName.new(XSD::Namespace, 'minLength')57 PatternName = XSD::QName.new(XSD::Namespace, 'pattern')58 61 RestrictionName = XSD::QName.new(XSD::Namespace, 'restriction') 59 62 SequenceName = XSD::QName.new(XSD::Namespace, 'sequence') … … 63 66 UnionName = XSD::QName.new(XSD::Namespace, 'union') 64 67 UniqueName = XSD::QName.new(XSD::Namespace, 'unique') 68 69 LengthName = XSD::QName.new(XSD::Namespace, 'length') 70 MinLengthName = XSD::QName.new(XSD::Namespace, 'minLength') 71 MaxLengthName = XSD::QName.new(XSD::Namespace, 'maxLength') 72 PatternName = XSD::QName.new(XSD::Namespace, 'pattern') 73 EnumerationName = XSD::QName.new(XSD::Namespace, 'enumeration') 74 WhiteSpaceName = XSD::QName.new(XSD::Namespace, 'whiteSpace') 75 MaxInclusiveName = XSD::QName.new(XSD::Namespace, 'maxInclusive') 76 MaxExclusiveName = XSD::QName.new(XSD::Namespace, 'maxExclusive') 77 MinExclusiveName = XSD::QName.new(XSD::Namespace, 'minExclusive') 78 MinInclusiveName = XSD::QName.new(XSD::Namespace, 'minInclusive') 79 TotalDigitsName = XSD::QName.new(XSD::Namespace, 'totalDigits') 80 FractionDigitsName = XSD::QName.new(XSD::Namespace, 'fractionDigits') 65 81 66 82 AbstractAttrName = XSD::QName.new(nil, 'abstract') trunk/lib/wsdl/xmlSchema/length.rb
r1824 r1902 25 25 def parse_attr(attr, value) 26 26 case attr 27 when FixedAttrName 28 parent.fixed[:length] = to_boolean(value) 27 29 when ValueAttrName 28 parent.length = Integer(value.source)30 parent.length = to_int(value) 29 31 end 30 32 end trunk/lib/wsdl/xmlSchema/maxlength.rb
r1824 r1902 25 25 def parse_attr(attr, value) 26 26 case attr 27 when FixedAttrName 28 parent.fixed[:maxlength] = to_boolean(value) 27 29 when ValueAttrName 28 parent.maxlength = Integer(value.source)30 parent.maxlength = to_int(value) 29 31 end 30 32 end trunk/lib/wsdl/xmlSchema/minlength.rb
r1824 r1902 25 25 def parse_attr(attr, value) 26 26 case attr 27 when FixedAttrName 28 parent.fixed[:minlength] = to_boolean(value) 27 29 when ValueAttrName 28 parent.minlength = Integer(value.source)30 parent.minlength = to_int(value) 29 31 end 30 32 end trunk/lib/wsdl/xmlSchema/simpleRestriction.rb
r1824 r1902 17 17 class SimpleRestriction < Info 18 18 attr_reader :base 19 attr_accessor :length 20 attr_accessor :minlength 21 attr_accessor :maxlength 22 attr_accessor :pattern 19 23 attr_reader :enumeration 20 attr_accessor :length 21 attr_accessor :maxlength 22 attr_accessor :minlength 23 attr_accessor :pattern 24 attr_reader :whitespace 25 attr_reader :maxinclusive 26 attr_reader :maxexlusive 27 attr_reader :minexlusive 28 attr_reader :mininclusive 29 attr_reader :totaldigits 30 attr_reader :fractiondigits 31 attr_reader :fixed 24 32 25 33 def initialize … … 31 39 @minlength = nil 32 40 @pattern = nil 41 @fixed = {} 33 42 end 34 43 … … 44 53 def parse_element(element) 45 54 case element 55 when LengthName 56 Length.new 57 when MinLengthName 58 MinLength.new 59 when MaxLengthName 60 MaxLength.new 61 when PatternName 62 Pattern.new 46 63 when EnumerationName 47 64 Enumeration.new 48 when LengthName 49 Length.new 50 when PatternName 51 Pattern.new 52 when MaxLengthName 53 MaxLength.new 54 when MinLengthName 55 MinLength.new 65 when WhiteSpaceName 66 WhiteSpace.new 67 when MaxInclusiveName 68 MaxInclusive.new 69 when MaxExlusiveName 70 MaxExlusive.new 71 when MinExlusiveName 72 MinExlusive.new 73 when MinInclusiveName 74 MinInclusive.new 75 when TotalDigitsName 76 TotalDigitsName.new 77 when FractionDigitsName 78 FractionDigitsName.new 56 79 end 57 80 end