Class: WSDL::Service

Inherits:
Info show all
Defined in:
lib/wsdl/service.rb

Instance Attribute Summary collapse

Attributes inherited from Info

#id, #parent, #root

Instance Method Summary collapse

Methods inherited from Info

#inspect, #parse_epilogue

Constructor Details

#initializeService

Returns a new instance of Service.



22
23
24
25
26
27
# File 'lib/wsdl/service.rb', line 22

def initialize
  super
  @name = nil
  @ports = XSD::NamedElements.new
  @soap_address = nil
end

Instance Attribute Details

#nameObject (readonly)

required



18
19
20
# File 'lib/wsdl/service.rb', line 18

def name
  @name
end

#portsObject (readonly)

Returns the value of attribute ports.



19
20
21
# File 'lib/wsdl/service.rb', line 19

def ports
  @ports
end

#soap_addressObject (readonly)

Returns the value of attribute soap_address.



20
21
22
# File 'lib/wsdl/service.rb', line 20

def soap_address
  @soap_address
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object



51
52
53
54
55
56
57
58
# File 'lib/wsdl/service.rb', line 51

def parse_attr(attr, value)
  case attr
  when NameAttrName
    @name = XSD::QName.new(targetnamespace, value.source)
  else
    nil
  end
end

#parse_element(element) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/wsdl/service.rb', line 33

def parse_element(element)
  case element
  when PortName
    o = Port.new
    @ports << o
    o
  when SOAPAddressName
    o = WSDL::SOAP::Address.new
    @soap_address = o
    o
  when DocumentationName
    o = Documentation.new
    o
  else
    nil
  end
end

#targetnamespaceObject



29
30
31
# File 'lib/wsdl/service.rb', line 29

def targetnamespace
  parent.targetnamespace
end