Class: LolSoap::WSDL
- Inherits:
-
Object
- Object
- LolSoap::WSDL
- Defined in:
- lib/lolsoap/wsdl.rb,
lib/lolsoap/wsdl/type.rb,
lib/lolsoap/wsdl/element.rb,
lib/lolsoap/wsdl/null_type.rb,
lib/lolsoap/wsdl/operation.rb,
lib/lolsoap/wsdl/null_element.rb
Defined Under Namespace
Classes: Element, NullElement, NullType, Operation, Type
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Class Method Summary collapse
-
.parse(raw) ⇒ Object
Create a new instance by parsing a raw string of XML.
Instance Method Summary collapse
-
#endpoint ⇒ Object
The SOAP endpoint URL.
-
#initialize(parser) ⇒ WSDL
constructor
A new instance of WSDL.
- #inspect ⇒ Object
-
#namespaces ⇒ Object
Hash of namespaces used in the WSDL document (keys are prefixes).
-
#operation(name) ⇒ Object
Get a single operation.
-
#operations ⇒ Object
Hash of operations that are supports by the SOAP service.
-
#prefixes ⇒ Object
Hash of namespace prefixes used in the WSDL document (keys are namespace URIs).
-
#type(name) ⇒ Object
Get a single type, or a NullType if the type doesn’t exist.
-
#type_namespaces ⇒ Object
Namespaces used by the types (a subset of #namespaces).
-
#types ⇒ Object
Hash of types declared by the service.
Constructor Details
#initialize(parser) ⇒ WSDL
Returns a new instance of WSDL.
18 19 20 |
# File 'lib/lolsoap/wsdl.rb', line 18 def initialize(parser) @parser = parser end |
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
16 17 18 |
# File 'lib/lolsoap/wsdl.rb', line 16 def parser @parser end |
Class Method Details
.parse(raw) ⇒ Object
Create a new instance by parsing a raw string of XML
12 13 14 |
# File 'lib/lolsoap/wsdl.rb', line 12 def self.parse(raw) new(WSDLParser.parse(raw)) end |
Instance Method Details
#endpoint ⇒ Object
The SOAP endpoint URL
43 44 45 |
# File 'lib/lolsoap/wsdl.rb', line 43 def endpoint parser.endpoint end |
#inspect ⇒ Object
62 63 64 65 66 67 |
# File 'lib/lolsoap/wsdl.rb', line 62 def inspect "<#{self.class} " \ "namespaces=#{namespaces.inspect} " \ "operations=#{operations.keys.inspect} " \ "types=#{types.keys.inspect}>" end |
#namespaces ⇒ Object
Hash of namespaces used in the WSDL document (keys are prefixes)
48 49 50 |
# File 'lib/lolsoap/wsdl.rb', line 48 def namespaces parser.namespaces end |
#operation(name) ⇒ Object
Get a single operation
28 29 30 |
# File 'lib/lolsoap/wsdl.rb', line 28 def operation(name) load_operations[name] end |
#operations ⇒ Object
Hash of operations that are supports by the SOAP service
23 24 25 |
# File 'lib/lolsoap/wsdl.rb', line 23 def operations load_operations.dup end |
#prefixes ⇒ Object
Hash of namespace prefixes used in the WSDL document (keys are namespace URIs)
53 54 55 |
# File 'lib/lolsoap/wsdl.rb', line 53 def prefixes namespaces.invert end |
#type(name) ⇒ Object
Get a single type, or a NullType if the type doesn’t exist
38 39 40 |
# File 'lib/lolsoap/wsdl.rb', line 38 def type(name) load_types.fetch(name) { NullType.new } end |
#type_namespaces ⇒ Object
Namespaces used by the types (a subset of #namespaces)
58 59 60 |
# File 'lib/lolsoap/wsdl.rb', line 58 def type_namespaces Hash[parser.types.map { |k, t| [prefixes[t[:namespace]], t[:namespace]] }] end |
#types ⇒ Object
Hash of types declared by the service
33 34 35 |
# File 'lib/lolsoap/wsdl.rb', line 33 def types load_types.dup end |