class WsdlMapper::Dom::Validator

Public Class Methods

new(schema) click to toggle source
# File lib/wsdl_mapper/dom/validator.rb, line 16
def initialize(schema)
  @schema = schema
end

Public Instance Methods

validate() click to toggle source
# File lib/wsdl_mapper/dom/validator.rb, line 20
def validate
  @errors = []
  validate_roots
  @errors
end
validate_roots() click to toggle source
# File lib/wsdl_mapper/dom/validator.rb, line 26
def validate_roots
  @schema.each_type do |type|
    next unless type.is_a?(::WsdlMapper::Dom::SimpleType)
    next if type.root.is_a?(::WsdlMapper::Dom::BuiltinType)

    @errors << Error.new(type, :invalid_root)
  end
end