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

How to connect to OpenERP server and make XML-RPC calls using JMeter?

By
Luis Filipe Castanheira
on 7/1/14, 10:50 AM 2,838 views

Hi!

I'm trying to test out load behaviour on the functionalities of a custom module I've been developing with JMeter, but I'm not even getting authenticated correctly.

I've been following these instruction http://selvam4u.wordpress.com/2011/05/25/load-testing-openerp-with-jmeter/

I have the configuration as follows, but I keep getting an INTERNAL SERVER ERROR.

JMeter.png

Am I doing anything wrong? Do I have to enable xmlrpc somewhere and I didn't?

-----------------------------------------------

Message error on logs:

2014-07-01 15:09:01,067 1206 INFO ? werkzeug: 193.136.201.121 - - [01/Jul/2014 15:09:01] "POST /xmlrpc/common HTTP/1.1" 500 -
2014-07-01 15:09:01,074 1206 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 159, in run_wsgi
    execute(app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 146, in execute
    application_iter = app(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 417, in application
    return application_unproxied(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 403, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 224, in wsgi_xmlrpc_legacy
    params, method = xmlrpclib.loads(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1135, in loads
    p.feed(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: not well-formed (invalid token): line 1, column 12
2014-07-01 15:09:01,084 1206 INFO ? werkzeug: 193.136.201.121 - - [01/Jul/2014 15:09:01] "POST /xmlrpc/object HTTP/1.1" 500 -
2014-07-01 15:09:01,089 1206 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 159, in run_wsgi
    execute(app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 146, in execute
    application_iter = app(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 417, in application
    return application_unproxied(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 403, in application_unproxied
    result = handler(environ, start_response)
  File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 224, in wsgi_xmlrpc_legacy
    params, method = xmlrpclib.loads(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1135, in loads
    p.feed(data)
  File "/usr/lib/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
ExpatError: not well-formed (invalid token): line 1, column 12
2014-07-01 15:09:04,574 1206 DEBUG ? openerp.service.cron: cron0 polling for jobs

The second part of the error is from the part I am trying to read from res_partners with the following XML calling http://193.136.200.176:8069/xmlrpc/object:

<?xmlversion="1.0"?>
<methodCall>
    <methodName>execute</methodName>
    <params>
        <param>
            <value><string>may_9</string></value>
        </param>
        <param>
            <value><int>UID</int></value>
        </param>
        <param>
            <value><string>admin</string></value>
        </param>

        <param>
            <value><string>res.partner</string></value>
        </param>
        <param>
            <value><string>read</string></value>
        </param>
        <param>
            <array>
                <data>
                    <int>1</int>
                </data>
                <data>
                    <int>2</int>
                </data>
            </array>
        </param>
        <param>
            <array>
                <data><string>name</string>
                </data>
                <data><string>title</string>
                </data>
            </array>
        </param>
    </params>
</methodCall>

Hello, what are the error messages in the log?

DelphineL
on 7/1/14, 11:15 AM

Hi, Could you try a test with replace  <value><int>UID</int></value> by  <value><int>1</int></value> 1 =  admin's id

DelphineL
on 7/1/14, 11:56 AM

after testing it works for me: 1) I replaced the UID of my user ID like my previous message 2) Correct the error in the XMLRPC Partner by adding </ data> after <data> <int> 2 </ int> 3) activated the module api web openerp (I do not know if it has an influence)

DelphineL
on 7/1/14, 12:10 PM
0
DelphineL
On 7/1/14, 12:12 PM

after having tested your file xmlrpc partner, replace <? xmlVersion = "1.0"?> 
with <? xml version = "1.0"?> with a space between xml and Version

I just found it... And this is where the error was. After two days of banging my head agains my computer, somehow, copy paste messed with the format and erased that space! :) Thanks!

Luis Filipe Castanheira
on 7/1/14, 12:23 PM

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: 7/1/14, 10:50 AM
Seen: 2838 times
Last updated: 3/16/15, 8:10 AM