Class: SOAP::WSDL
- Inherits:
-
Object
- Object
- SOAP::WSDL
- Defined in:
- lib/wsdl-reader/wsdl.rb,
lib/wsdl-reader/service.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#parse ⇒ Object
readonly
Returns the value of attribute parse.
Instance Method Summary collapse
-
#call(name, args = {}) ⇒ Object
Call a method for the current WSDL and get the corresponding SOAP::Request.
-
#initialize(uri, binding) ⇒ WSDL
constructor
:nodoc:.
-
#method_missing(id, *args) ⇒ Object
Call a method for the current WSDL and get the corresponding SOAP::Request.
-
#operations ⇒ Object
Return available SOAP operations.
-
#request(binding = nil) ⇒ Object
Get a SOAP::Request object for the current WSDL.
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args) ⇒ Object
Call a method for the current WSDL and get the corresponding SOAP::Request
Example:
wsdl = SOAP::LC.new.wsdl("http://...")
request = wsdl.myMethod(:param1 => "hello")
# => #<SOAP::Request:0xNNNNNN>
19 20 21 |
# File 'lib/wsdl-reader/wsdl.rb', line 19 def method_missing(id, *args) request(@binding).call(id.id2name, args[0]) end |
Instance Attribute Details
#parse ⇒ Object (readonly)
Returns the value of attribute parse.
6 7 8 |
# File 'lib/wsdl-reader/wsdl.rb', line 6 def parse @parse end |
Instance Method Details
#call(name, args = {}) ⇒ Object
Call a method for the current WSDL and get the corresponding SOAP::Request
Example:
wsdl = SOAP::LC.new.wsdl("http://...")
request = wsdl.call("myMethod", { :param1 => "hello" })
# => #<SOAP::Request:0xNNNNNN>
34 35 36 |
# File 'lib/wsdl-reader/wsdl.rb', line 34 def call(name, args = {}) request(@binding).call(name, args) end |
#operations ⇒ Object
Return available SOAP operations
24 25 26 |
# File 'lib/wsdl-reader/wsdl.rb', line 24 def operations request(@binding).operations end |