Class: WSDL::Service

Inherits:
Info show all
Defined in:
lib/action_web_service/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.



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

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

Instance Attribute Details

#nameObject (readonly)

required



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

def name
  @name
end

#portsObject (readonly)

Returns the value of attribute ports.



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

def ports
  @ports
end

#soap_addressObject (readonly)

Returns the value of attribute soap_address.



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

def soap_address
  @soap_address
end

Instance Method Details

#parse_attr(attr, value) ⇒ Object



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

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

#parse_element(element) ⇒ Object



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

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



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

def targetnamespace
  parent.targetnamespace
end