Flex + Rails + Mysql Database Error

Hi,   I am integrating flex front end with rails back end. I am simply using XML formatted data.

If there is some data in the database then i am able to generate xml data through rails. and using HTTPServices i am displaying this xml data in flex front end using datagrid.

But when i want to insert some records in database it throws me an error

[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:3000/reviews/create"\]. URL: http://localhost:3000/reviews/create"\]

HTTPService:

<mx:HTTPService contentType="application/xml" id="reviewCreateRequest"                     url="http://localhost:3000/reviews/create&quot;                     useProxy="false" method="POST">         <mx:request xmlns="">             <review>                 <title>{fTitle.text}</title>                 <author>{fAuthor.text}</author>                 <score>{fScore.text}</score>                 <text>{fText.text}</text>             </review>         </mx:request>     </mx:HTTPService>

my controller looks like :

class ReviewsController < ApplicationController def list       @reviews = Review.find :all       render :xml => @reviews.to_xml     end def create       @review = Review.new(params[:review])       @review.save       render :xml => @review.to_xml     end end

I saw the rails log file. The xml data is which i am sending to database is there but cant write it to the database

Log file

Processing ReviewsController#create (for 127.0.0.1 at 2008-02-22 01:17:05) [POST]   Session ID: BAh7ByIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo %0ASGFzaHsABjoKQHVzZWR7ADoMY3NyZl9pZCIlYjUzYzJjZWQ3MjA2YWE3ZjE2%0AZWU4MGU3OWYwYzllOTI %3D--4d18c41667e30a8839a800fad2701d4b0c6303c6   Parameters: {"review"=>{"score"=>"123", "text"=>"jkjfdfdf", "title"=>"RoR", "author"=>"XYZ"}, "action"=>"create", "controller"=>"reviews"} . . . Rendering c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/templates/rescues/layout.erb (unprocessable_entity)

I am following the same tutorial given here http://www.liverail.net/articles/2006/4/16/rubyonrails-1-1-and-flex-2-0-pt-1

Is this a problem due to new rails version?

Any suggestion regarding this will be appreciated Thanks in advance Mukesh sahu