We can set http response status and location while rendering xml response.
See the below example and use following link http://www.codyfauser.com/2008/7/4/rails-http-status-code-to-symbol-mapping to refer http status codes.
respond_to do |format|
format.xml {render :xml => data.to_xml(:root=> "xyz"), :status => :accepted, :location => "xyz.com"}
}
end
Cheers
Alok Anand
Rails Detective