In this task, the goal is to create a SOAP client which accesses functions defined at http://example.com/soap/wsdl, and calls the functions soapFunc( ) and anotherSoapFunc( ).

This task has been flagged for clarification. Code on this page in its current state may be flagged incorrect once this task has been clarified. See this page's Talk page for discussion.


require 'soap/wsdlDriver'
 
wsdl = SOAP::WSDLDriverFactory.new("http://example.com/soap/wsdl")
soap = wsdl.create_rpc_driver
 
response1 = soap.soapFunc(:elementName => "value")
puts response1.soapFuncReturn
 
response2 = soap.anotherSoapFunc(:aNumber => 42)
puts response2.anotherSoapFuncReturn