Unable to do this via SOAP4R, unfortunately. SOAP4R is more suitable for interacting with SOAP endpoints or generates its own through the WSDL specification.
The only Ruby code I know comes from ActionWebService, which was part of Rails, pre-Rails 2. If you install the actionwebservice gem (you will probably have to force it), you can look at the to_wsdl method in the lib/action_web_service/dispatcher/action_controller_dispatcher.rb . This creates a WSDL using the Builder library. Definitions for WSDL are defined using methods in the ActionWebService::API . It should not be too complicated to extract this code into what you can use for your project.
source share