It is currently Mon May 21, 2012 4:51 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Example java classes for XMLRPC interface?
PostPosted: Fri Mar 05, 2010 10:30 am 
Offline

Joined: Thu Apr 17, 2008 8:00 am
Posts: 183
Hi,

In the developer docs there is some skeleton code to connecting to Openerp via xmlrpc in Java:
http://doc.openerp.com/developer/6_22_X ... index.html

Has anyone published any further classes, examples etc?
Googling turned up:
ttp://rvalyi.blogspot.com/2009/02/opene ... und-1.html
http://code.google.com/p/openerpclient-java/

Are there any other resources I can pass onto a java programming want to interface to Openerp?

Merci,

Sean


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2010 8:04 pm 
Offline

Joined: Fri Jan 25, 2008 8:01 pm
Posts: 720
@boran,

I tell you that we are very successful in using OOOR http://github.com/rvalyi/ooor on JRuby and passing back values to the Java language world using the JSR223.
We use that in the Kettle ETL for real world bank integration and JDBC import via Kettle of OSCommerce orders.
All our code + binaries are here:
http://github.com/rvalyi/terminatooor
We will hopefully have time to demo it better soon. This is a revolution for OpenERP data integration as once in Kettle it becomes a trainee job to connect OpenERP with pretty much anything Kettle can connect to.

NB: in head revisions of OOOR we generate method stubs to have auto-completion upon OpenERP object in advanced IRB consoles such as tha jirb_swing bundled in JRuby samples. JRuby head is coming with a powerfull Ruby to plain Java class generator. That work only if we generate full fields and relationnal methods with method_define rather than dynamic dispatch with method_missing (as we still do despite the autcompletion hints), but we could eventually do that if we see some potential, at least to generate Java objects with field and relation accessors. An other approach would be to directly dump Java code from those methods and still benefit from OOOR OpenERP datamode introspection capabilities for doing so.

Finally, the JSR 223 or possibly the better but non standard RedBridge: http://kenai.com/projects/jruby/pages/RedBridge just work to pass values back and forth, it just that you don't benefit static typing nor true business model OOP inside Java then.

Honestly, JRuby totally kicks *, and you can still use any Java lib you need and it also work and Android mobile phones, so I'm really not sure you go with the history when trying to stick with the Java language.

_________________
Raphaël Valyi

CEO and OpenERP consultant at
http://www.akretion.com
http://twitter.com/rvalyi


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2010 8:57 pm 
Offline

Joined: Fri Jan 25, 2008 8:01 pm
Posts: 720
wow!!

Right in time:

This JRuby commit from a few minutes ago just show how to do dynamic dispatch upon JRuby using method_missing:
http://github.com/jruby/jruby/commit/db ... 2d876add09

This is exactly how you could plug to our OOOR method_missing proxy to OpenERP objects fields/attributs/methods from the Java world I think.

BTW, in OpenERP 5.2 we will have a good partial compatibility with Jython indeed (I had my merges proposal merged for that). Then, depending both how seriously OpenERP S.A. consider that option and how Jython rival CPython perf, that would be an other bridge option to the Java world, and possibly later (not before a year though) to other JSR223 languages such as JRuby, Scala, Groovy skipping the web service layer.

_________________
Raphaël Valyi

CEO and OpenERP consultant at
http://www.akretion.com
http://twitter.com/rvalyi


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 06, 2010 11:58 am 
Offline

Joined: Thu Apr 17, 2008 8:00 am
Posts: 183
Raphaël,

Well thanks very much for taking the time to provide such a detailed answer.
I've not programmed java for over 10 years myself, so I'm a bit rusty. The request was on behalf of a colleague who needs to query partner and product data from a java app.

Is it correct to say jython allows java libraries to be easily called from within python, but is more limited in it's access to classical systems libraries which had C interfaces?

OOOR allows the rails/ruby work to connect to openerp, but also opens a door to java.

You're work goes really far, but for such simple needs as noted above it would presumably take some time to gets one head around all of that?
My colleague is not a ruby programmer either.
Have you looked at the (simple) openerpclient-java noted above?

A+


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP