Forum: Ruby on Rails Allowing XML-RPC class.methodName (not MethodName)?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
69f4b9b411dfcaebe01d0fde8c751726?d=identicon&s=25 Nate (Guest)
on 2007-01-10 11:30
(Received via mailing list)
I'm trying to replace a legacy XML-RPC server with a Rails app, and all
is going really well, with one exception. I can't find a way to allow
javaCaseMethods for XML-RPC calls. It seems Rails wants
CapsCaseMethods, ie:

   auth.HasPermission   # works
   auth.hasPermission   # nope
   auth.has_permission  # nope

Is it possible to get the second two working? Snippets of my AuthAPI:

   class RpcController < ApplicationController
      wsdl_service_name 'RPC'
      web_service_dispatching_mode :layered

     # Send auth.* to AuthService
     web_service :auth, AuthService.new
   end

   class AuthAPI < ActionWebService::API::Base
      api_method :has_permission,
                          :expects => [:string, :string, :string,
:string],
                          :returns => [:bool]
   end

   class AuthService < ActionWebService::Base
      def has_permission(user_id, auth_object_key, permission_realm,
permission)
      auth_object_id = AuthObject.convert_key_to_id(auth_object_key)
      User.has_permission?(user_id, auth_object_id, permission_realm,
permission)
   end


Thanks,
Nate
69f4b9b411dfcaebe01d0fde8c751726?d=identicon&s=25 Nate (Guest)
on 2007-01-10 12:11
(Received via mailing list)
Found the answer here:

http://blogs.thewehners.net/josh/view/250

Apparently need to use "inflect_names false", and then manually declare
methods with properMixedCase.
This topic is locked and can not be replied to.