~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to lib/wsdl/importer.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
9
require 'wsdl/xmlSchema/importer'
 
10
require 'wsdl/parser'
 
11
 
 
12
 
 
13
module WSDL
 
14
 
 
15
 
 
16
class Importer < WSDL::XMLSchema::Importer
 
17
  def self.import(location, originalroot = nil)
 
18
    new.import(location, originalroot)
 
19
  end
 
20
 
 
21
private
 
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
 
 
35
end
 
36
 
 
37
 
 
38
end