ActionWebServer and SOAPFault

I’m really new to RoR and my first task is to write SOAP web service.
The problem is that I don’t understand how to send custom SOAPFault
messages in case of the errors.

For example, I have FindCustomerById API signature:

api_method :find_customer_by_id,
:expects => [{:customer_id => :int}],
:returns => [Customer]

And controller:

def find_customer_by_id(customer_id)
Customer.find(customer_id)
end

The requirement from the vendor is that if such customer does not
exist
I send back to client SOAPFault message with faultcode =
“error”, faultstring = “no such customer” and such detail:

incorrect_request Custome with such customer_id does not exists

I cant figure out how to construct such SOAPFault message and send it
back. Please help me, with some example code if possible.

Hi,

I am actually having the same problem. Have you figured out how to
construct a SOAPFault object using RoR? If so, would it possible to
give me some clue?

Thanks,
Yan