Is it possible to connect with XMLRPC without sending the DB name as one of arguments?

38 views
Skip to first unread message

Fabyc

unread,
May 17, 2016, 10:27:22 AM5/17/16
to tryton
Hi.

Is it possible to connect with XMLRPC without sending the database name as one of its arguments?

Currently I see an example to connect like this:

s = xmlrpclib.ServerProxy ('http://%s:%s@localhost:8069/databasename' % (user, password))

I would like to know how is it possible to connect like this one?:

s = xmlrpclib.ServerProxy ('http://%s:%s@localhost:8069' % (user, password))

The database name would be set in the Tryton instance in where it is accepting connections 
from any XMLRPC client (Python, PHP, Java, etc.).

I would like to know if there is a way to create a connection like this example [1] with Magento API 
in this link [2] in where it is possible to connect with only sending user and password [3]:

[1]
server = xmlrpclib.ServerProxy(‘http://www.yourmagentosite.com/api/xmlrpc/’)

[2]

[3]
session = server.login(‘your_username’, ‘your_password’)


Thanks in advanced for your help

--
Regards

Cédric Krier

unread,
May 18, 2016, 7:40:09 AM5/18/16
to tryton
On 2016-05-17 07:27, Fabyc wrote:
> Hi.
>
> Is it possible to connect with XMLRPC without sending the database name as
> one of its arguments?

No, the system must know the database.
But you can put a proxy in front that rewrites the url on the fly to
append a default database name.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Fabyc

unread,
Jun 21, 2016, 11:45:26 AM6/21/16
to tryton
On Wednesday, May 18, 2016 at 6:40:09 AM UTC-5, Cédric Krier wrote:
On 2016-05-17 07:27, Fabyc wrote:
> Hi.
>
> Is it possible to connect with XMLRPC without sending the database name as
> one of its arguments?

No, the system must know the database.
But you can put a proxy in front that rewrites the url on the fly to
append a default database name.

OK.
Thanks
Reply all
Reply to author
Forward
0 new messages