PageRenderTime 56ms CodeModel.GetById 50ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/1.8/wsdl/importer.rb

http://github.com/agross/netopenspace
Ruby | 38 lines | 21 code | 12 blank | 5 comment | 0 complexity | ee875dd52d4f9846d2286d5e30ecd674 MD5 | raw file
 1# WSDL4R - WSDL importer library.
 2# Copyright (C) 2003, 2005  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
 9require 'wsdl/xmlSchema/importer'
10require 'wsdl/parser'
11
12
13module WSDL
14
15
16class Importer < WSDL::XMLSchema::Importer
17  def self.import(location, originalroot = nil)
18    new.import(location, originalroot)
19  end
20
21private
22
23  def parse(content, location, originalroot)
24    opt = {
25      :location => location,
26      :originalroot => originalroot
27    }
28    begin
29      WSDL::Parser.new(opt).parse(content)
30    rescue WSDL::Parser::ParseError
31      super(content, location, originalroot)
32    end
33  end
34
35end
36
37
38end