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,
lib/lolsoap/wsdl/named_type_reference.rb,
lib/lolsoap/wsdl/immediate_type_reference.rb
Defined Under Namespace
Classes: Element, ImmediateTypeReference, NamedTypeReference, NullElement, NullType, Operation, Type
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
The SOAP endpoint URL.
-
#namespaces ⇒ Object
readonly
Hash of namespaces used in the WSDL document (keys are prefixes).
-
#prefixes ⇒ Object
readonly
Hash of namespace prefixes used in the WSDL document (keys are namespace URIs).
-
#soap_version ⇒ Object
readonly
The version of SOAP detected.
-
#type_namespaces ⇒ Object
readonly
Namespaces used by the types (a subset of #namespaces).
Class Method Summary collapse
-
.parse(raw) ⇒ Object
Create a new instance by parsing a raw string of XML.
Instance Method Summary collapse
-
#initialize(parser) ⇒ WSDL
constructor
A new instance of WSDL.
- #inspect ⇒ Object
-
#operation(name) ⇒ Object
Get a single operation.
-
#operations ⇒ Object
Hash of operations that are supports by the SOAP service.
-
#type(name) ⇒ Object
Get a single type, or a NullType if the type doesn’t exist.
-
#types ⇒ Object
Hash of types declared by the service.
Constructor Details
#initialize(parser) ⇒ WSDL
Returns a new instance of WSDL.
33 34 35 36 37 38 39 40 41 |
# File 'lib/lolsoap/wsdl.rb', line 33 def initialize(parser) @types = load_types(parser) @operations = load_operations(parser) @endpoint = parser.endpoint @namespaces = parser.namespaces @type_namespaces = load_type_namespaces(parser) @prefixes = parser.prefixes @soap_version = parser.soap_version end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
The SOAP endpoint URL
19 20 21 |
# File 'lib/lolsoap/wsdl.rb', line 19 def endpoint @endpoint end |
#namespaces ⇒ Object (readonly)
Hash of namespaces used in the WSDL document (keys are prefixes)
22 23 24 |
# File 'lib/lolsoap/wsdl.rb', line 22 def namespaces @namespaces end |
#prefixes ⇒ Object (readonly)
Hash of namespace prefixes used in the WSDL document (keys are namespace URIs)
28 29 30 |
# File 'lib/lolsoap/wsdl.rb', line 28 def prefixes @prefixes end |
#soap_version ⇒ Object (readonly)
The version of SOAP detected.
31 32 33 |
# File 'lib/lolsoap/wsdl.rb', line 31 def soap_version @soap_version end |
#type_namespaces ⇒ Object (readonly)
Namespaces used by the types (a subset of #namespaces)
25 26 27 |
# File 'lib/lolsoap/wsdl.rb', line 25 def type_namespaces @type_namespaces end |
Class Method Details
.parse(raw) ⇒ Object
Create a new instance by parsing a raw string of XML
14 15 16 |
# File 'lib/lolsoap/wsdl.rb', line 14 def self.parse(raw) new(WSDLParser.parse(raw)) end |
Instance Method Details
#inspect ⇒ Object
63 64 65 66 67 68 |
# File 'lib/lolsoap/wsdl.rb', line 63 def inspect "<#{self.class} " \ "namespaces=#{@namespaces.inspect} " \ "operations=#{@operations.keys.inspect} " \ "types=#{@types.keys.inspect}>" end |
#operation(name) ⇒ Object
Get a single operation
59 60 61 |
# File 'lib/lolsoap/wsdl.rb', line 59 def operation(name) @operations.fetch(name) end |
#operations ⇒ Object
Hash of operations that are supports by the SOAP service
54 55 56 |
# File 'lib/lolsoap/wsdl.rb', line 54 def operations @operations.dup end |
#type(name) ⇒ Object
Get a single type, or a NullType if the type doesn’t exist
49 50 51 |
# File 'lib/lolsoap/wsdl.rb', line 49 def type(name) @types.fetch(name) { NullType.new } end |
#types ⇒ Object
Hash of types declared by the service
44 45 46 |
# File 'lib/lolsoap/wsdl.rb', line 44 def types @types.dup end |