Class: SOAP::WSDL::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/soap/lc/wsdl/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Parser



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/soap/lc/wsdl/parser.rb', line 25

def initialize( uri )
  @types = SOAP::XSD.new()
  @messages = SOAP::WSDL::Messages.new
  @portTypes = SOAP::WSDL::PortTypes.new
  @bindings = SOAP::WSDL::Bindings.new
  @services = SOAP::WSDL::Services.new
  
  @prefixes = Hash.new
  @targetNamespace = ""

  # Get WSDL 
  source = nil
  begin
    open( uri ) do |f|
      source = f.read
    end
  rescue Errno::ECONNREFUSED, Errno::ENOENT, OpenURI::HTTPError => e
    raise SOAP::LCError, "Can't open '#{uri}' : #{e.message}"
  end

  # Parse WSDL content
  @document = REXML::Document.new( source )
  
  processAttributes @document.root.attributes
  processContent @document.root.children
end

Instance Attribute Details

#bindings ⇒ Object (readonly)

Returns the value of attribute bindings.



17
18
19
# File 'lib/soap/lc/wsdl/parser.rb', line 17

def bindings
  @bindings
end

#document ⇒ Object (readonly)

Returns the value of attribute document.



23
24
25
# File 'lib/soap/lc/wsdl/parser.rb', line 23

def document
  @document
end

#messages ⇒ Object (readonly)

Returns the value of attribute messages.



15
16
17
# File 'lib/soap/lc/wsdl/parser.rb', line 15

def messages
  @messages
end

#portTypes ⇒ Object (readonly)

Returns the value of attribute portTypes.



16
17
18
# File 'lib/soap/lc/wsdl/parser.rb', line 16

def portTypes
  @portTypes
end

#prefixes ⇒ Object (readonly)

Returns the value of attribute prefixes.



20
21
22
# File 'lib/soap/lc/wsdl/parser.rb', line 20

def prefixes
  @prefixes
end

#services ⇒ Object (readonly)

Returns the value of attribute services.



18
19
20
# File 'lib/soap/lc/wsdl/parser.rb', line 18

def services
  @services
end

#targetNamespace ⇒ Object (readonly)

Returns the value of attribute targetNamespace.



21
22
23
# File 'lib/soap/lc/wsdl/parser.rb', line 21

def targetNamespace
  @targetNamespace
end

#types ⇒ Object (readonly)

Returns the value of attribute types.



14
15
16
# File 'lib/soap/lc/wsdl/parser.rb', line 14

def types
  @types
end