Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

v7: setup session_id

By
feriel bendimerad
on 11/9/14, 9:17 AM 509 views

i've read  this  : https://www.odoo.com/forum/help-1/question/v8-authentification-json-query-has-changed-solved-44073

i've tried to get the sid ( using json queries) from /web/session/get_session_info but i've got nothing , here is the code:

 static final String REQUEST_AUTHENTICATE1 = "/web/session/get_session_info";

 HttpClient httpClient = new DefaultHttpClient();
        
        JSONRPCHttpClient jsonRPC_client = new JSONRPCHttpClient(httpClient, HOST + REQUEST_AUTHENTICATE1);
        jsonRPC_client.setConnectionTimeout(2000);
        jsonRPC_client.setSoTimeout(2000);
        jsonRPC_client.setEncoding("UTF-8");
        
        
        try {
            //set params to send to OpenERP to create the connection
            JSONObject jsonParams = new JSONObject();
            jsonParams.put("db", DATABASE);
            jsonParams.put("login", USER);
            jsonParams.put("password",PASSWORD);
            
            //Do the connection with openERP
            JSONObject json_result = jsonRPC_client.callJSONObject(method, jsonParams);
           Log.d(TAG, "We are connect to OpenERP, session id: " + json_result.getString("session_id"));

            

0
zahid
On 5/12/15, 7:31 AM

Could you be more precise ? what are the errors you've got. Can you just paste the log output.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 11/9/14, 9:17 AM
Seen: 509 times
Last updated: 5/12/15, 7:31 AM