Good Day,

I use ActionWebService  for creation Blog API trough creation XMLRPC
controller

class XmlrpcController < ApplicationController
  web_service_dispatching_mode :layered

  web_service(:blogger)     { BloggerService.new() }
end

class BloggerAPI < ActionWebService::API::Base
  inflect_names false

  api_method :newPost, :returns => [:string], :expects => [
    {:appkey=>:string},
    {:blogid=>:string},
    {:username=>:string},
    {:password=>:string},
    {:content=>:string},
    {:publish=>:bool}
  ]

end

class BloggerService < ActionWebService::Base
  web_service_api BloggerAPI

  def initialize
    @postid = 0
  end

  def newPost(key, id, user, pw, content, publish)
    $stderr.puts "id=#{id} user=#{user} pw=#{pw},
content=#{content.inspect} [#{publish}]"
    (@postid += 1).to_s
  end

end

in Routes.rb I have row: map.connect "/xmlrpc/api", :controller =>
"xmlrpc", :action => "api"

When I use development environment with set in config/
development.rb:    config.cache_classes = false

For first call to blog API - I always take:

ActionController::UnknownAction (No action responded to api. Actions:
access_denied, authorization_failure!, authorized?, current_user,
current_user=, current_user?, login_from_cookie, login_required,
protected?, reject_unconfirmed_user, render_without_selector,
store_location, stub_user, and wsdl):
    /vendor/rails/actionpack/lib/action_controller/filters.rb:617:in
`call_filters'
.........

But next call always processed correct.

When I use production environment with set in config/production.rb:
config.cache_classes = true

I always take: ActionController::UnknownAction

How I can correct that?

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to