0 Replies Latest reply on Sep 13, 2012 10:58 PM by Nick Peng

    How to call a RhoConnect SourceAdapter's custom method from RhoMobile Controller?

    Nick Peng

      Please help me,  how to call a RhoConnect SourceAdapter's custom method from RhoMobile Controller?

       

      The following is my code:

       

      #RhoConnect
      class IncomingShipment < SourceAdapter

        def confirm(data_hash)
         
          ws = CallXMLRPC.new
          result = ws.picking_validate(data_hash)
         
          return result   
        end

      end

       

      #RhoMobile
      class IncomingShipmentController < Rho::RhoController

        def process
             
          result = IncomingShipment.confirm({"state"=>"done"})

          redirect :action => :index
        end

      end

       

      When I do a  process method, I get the following error
      App error: undefined method 'confirm'

       

      How to call a RhoConnect SourceAdapter's custom method from RhoMobile

      Controller or in any other way? 

       

      Thanks.