Generating wsdl in ruby

does anybody know how to generate wsdl file when you create a soap
server/client in ruby? is there a funcion?

depot> ruby script/generate web_service Backend find_all_products
find_product_by_id

This generates a stub API definition.

class BackendApi < ActionWebService::API::Base
api_method :find_all_products
api_method :find_product_by_id
end

And it generates a skeleton controller.

class BackendController < ApplicationController

wsdl_service_name ‘Backend’

def find_all_products
end
def find_product_by_id
end
end
And it generates a sample functional test.

We’ll need to finish off the API definition.

class BackendApi < ActionWebService::API::Base
api_method :find_all_products,
:returns => [[:int]]
api_method :find_product_by_id,
:expects => [:int],
:returns => [Product]
end

wsdl_service_name ‘Backend’

The wsdl_service_name( ) method
associates a name with the service that will be used in generated Web
Services Definition Language (WSDL). It is not necessary, but setting it
is
recommended.

i have picked the example from agile web development hope it helps