Class: Sekken::WSDL::Document
- Inherits:
-
Object
- Object
- Sekken::WSDL::Document
- Defined in:
- lib/sekken/wsdl/document.rb
Instance Attribute Summary collapse
-
#bindings ⇒ Object
readonly
Returns the value of attribute bindings.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#port_types ⇒ Object
readonly
Returns the value of attribute port_types.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
Instance Method Summary collapse
- #imports ⇒ Object
-
#initialize(document, schemas) ⇒ Document
constructor
A new instance of Document.
- #schemas ⇒ Object
- #service_name ⇒ Object
- #target_namespace ⇒ Object
Constructor Details
#initialize(document, schemas) ⇒ Document
Returns a new instance of Document.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/sekken/wsdl/document.rb', line 11 def initialize(document, schemas) @document = document @schemas = schemas @messages, @bindings, @port_types, @services = {}, {}, {}, {} collect_sections( 'message' => { :collection => @messages, :container => Message }, 'binding' => { :collection => @bindings, :container => Binding }, 'portType' => { :collection => @port_types, :container => PortType }, 'service' => { :collection => @services, :container => Service } ) end |
Instance Attribute Details
#bindings ⇒ Object (readonly)
Returns the value of attribute bindings.
25 26 27 |
# File 'lib/sekken/wsdl/document.rb', line 25 def bindings @bindings end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
25 26 27 |
# File 'lib/sekken/wsdl/document.rb', line 25 def @messages end |
#port_types ⇒ Object (readonly)
Returns the value of attribute port_types.
25 26 27 |
# File 'lib/sekken/wsdl/document.rb', line 25 def port_types @port_types end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
25 26 27 |
# File 'lib/sekken/wsdl/document.rb', line 25 def services @services end |
Instance Method Details
#imports ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/sekken/wsdl/document.rb', line 39 def imports imports = [] @document.root.xpath('wsdl:import', 'wsdl' => Sekken::NS_WSDL).each do |node| location = node['location'] imports << location if location end imports end |
#schemas ⇒ Object
35 36 37 |
# File 'lib/sekken/wsdl/document.rb', line 35 def schemas schema_nodes.map { |node| XS::Schema.new(node, @schemas) } end |
#service_name ⇒ Object
27 28 29 |
# File 'lib/sekken/wsdl/document.rb', line 27 def service_name @document.root['name'] end |
#target_namespace ⇒ Object
31 32 33 |
# File 'lib/sekken/wsdl/document.rb', line 31 def target_namespace @document.root['targetNamespace'] end |