Class: WSDL::PortType
  
  
  
  
  
    - Inherits:
- 
      Info
      
        
          - Object
- Info
- WSDL::PortType
 show all
    - Defined in:
- lib/wsdl/portType.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
  
    
  
  
    
Returns a new instance of PortType.
   
 
  
  
    | 
24
25
26
27
28 | # File 'lib/wsdl/portType.rb', line 24
def initialize
  super
  @name = nil
  @operations = XSD::NamedElements.new
end | 
 
  
 
  
    Instance Attribute Details
    
      
      
      
  
  
    #name  ⇒ Object  
  
  
  
  
  
    | 
17
18
19 | # File 'lib/wsdl/portType.rb', line 17
def name
  @name
end | 
 
    
      
      
      
  
  
    #operations  ⇒ Object  
  
  
  
  
    
Returns the value of attribute operations.
   
 
  
  
    | 
18
19
20 | # File 'lib/wsdl/portType.rb', line 18
def operations
  @operations
end | 
 
    
   
  
    Instance Method Details
    
      
  
  
    #find_binding  ⇒ Object 
  
  
  
  
    | 
30
31
32
33 | # File 'lib/wsdl/portType.rb', line 30
def find_binding
  root.bindings.find { |item| item.type == @name } or
    raise RuntimeError.new("#{@name} not found")
end | 
 
    
      
  
  
    #locations  ⇒ Object 
  
  
  
  
    | 
35
36
37
38
39
40
41
42
43
44
45
46 | # File 'lib/wsdl/portType.rb', line 35
def locations
  bind_name = find_binding.name
  result = []
  root.services.each do |service|
    service.ports.each do |port|
      if port.binding == bind_name
        result << port.soap_address.location if port.soap_address
      end
    end
  end
  result
end | 
 
    
      
  
  
    #parse_attr(attr, value)  ⇒ Object 
  
  
  
  
    | 
62
63
64
65
66
67
68
69 | # File 'lib/wsdl/portType.rb', line 62
def parse_attr(attr, value)
  case attr
  when NameAttrName
    @name = XSD::QName.new(targetnamespace, value.source)
  else
    nil
  end
end | 
 
    
      
  
  
    #parse_element(element)  ⇒ Object 
  
  
  
 
    
      
  
  
    #targetnamespace  ⇒ Object 
  
  
  
  
    | 
20
21
22 | # File 'lib/wsdl/portType.rb', line 20
def targetnamespace
  parent.targetnamespace
end |