Class: SOAP::WSDL
- Inherits:
-
Object
- Object
- SOAP::WSDL
- Defined in:
- lib/soap/lc/wsdl.rb,
lib/soap/lc/wsdl/parser.rb,
lib/soap/lc/wsdl/binding.rb,
lib/soap/lc/wsdl/message.rb,
lib/soap/lc/wsdl/service.rb,
lib/soap/lc/wsdl/portType.rb
Defined Under Namespace
Classes: Binding, Bindings, Message, Messages, Parser, PortType, PortTypes, Service, Services
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
#initialize(uri, binding) ⇒ WSDL
:nodoc:
8 9 10 11 |
# File 'lib/soap/lc/wsdl.rb', line 8 def initialize( uri, binding ) #:nodoc: @parse = SOAP::WSDL::Parser.new( uri ) @binding = binding end |
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/soap/lc/wsdl.rb', line 19 def method_missing( id, *args ) return 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/soap/lc/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/soap/lc/wsdl.rb', line 34 def call( name, args = {} ) return request( @binding ).call( name, args ) end |
#operations ⇒ Object
Return available SOAP operations
24 25 26 |
# File 'lib/soap/lc/wsdl.rb', line 24 def operations return request( @binding ).operations end |
#request(binding = nil) ⇒ Object
Get a SOAP::Request object for the current WSDL
Example:
wsdl = SOAP::LC.new( ).wsdl( "http://..." )
request = wsdl.request( )
# => #<SOAP::Request:0xNNNNNN>
44 45 46 |
# File 'lib/soap/lc/wsdl.rb', line 44 def request( binding = nil ) return SOAP::Request.new( @parse, binding ) end |