开发者

Rhosync server error: Server returned an error

I am trying to connec开发者_开发问答t to oracle crm on demand web service url : from my rhodes application. the code in application.rb of my rhosync application looks something like this...

def authenticate(username,password,session)
      puts "USER:#{username}"
      success = false
      puts "Inside Authenticate method"
      begin
        oraclecrm_url = Application.get_settings[:oraclecrm_service_url]
        request_url = oraclecrm_url + "?command=" + 'login'
        puts "******************"
        puts oraclecrm_url
        puts request_url
        puts username
        puts password
        puts "******************"
        # here we just verifying the credetials
        # by loggin in and immediately logging out
        in_headers = {
          "UserName" => username,
          "Password" => password
        };
        puts request_url
         RestClient.get(request_url, in_headers) do |response,request,result,&block|
            puts "*******************"
            puts response.code
            puts request_url
            puts "********************" # Works Fine Upto this point...
          case response.code
           when 200
            # store password to be used by SourceAdaptors
            puts "*******************"
            puts response.code
            puts request_url
            puts "Login Successful!!!!!"
            puts "********************"
            Store.put_value("#{username}:password", password)
            Store.put_value("#{username}:service_url", oraclecrm_url)

But i am getting an HTTP Error 500. i.e the response.code returns 500 so i get an error as LOGIN ERROR. and something like invalid user id or password make sure ur caps lock is off and then try again. the code is SBL-ODU-01006. i have entered a valid id and password, there is no problem with that. Steps i follow ;

$ rake redis:start
$ rake rhosync:start
$ rake run:android

After the simulator is up and running i enter my credientials and i get the error message as Server returned an error.

Can someone please fix this problem?


Can you ping the service with curl and your credentials?

I always start debugging these kinds of things from the command line and ignore the code.

If you can get there from curl then you know it's in your software, otherwise you can work out what is wrong with your credentials.

500 is a real fail, not credentials - is there anything in the server logs at the Oracle CRM end?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜