Consuming Idempiere WS with REST

396 views
Skip to first unread message

Henrique A. Lavezzo

unread,
Aug 12, 2015, 1:41:36 PM8/12/15
to iDempiere
Hello everyone,
 
Recently, I opened a discussion about web service communications between two distinct Idempiere instances. Ok, all my questions about the server configuration were answered.
Now I need to consume this WS in one of Idempiere instances. I chose the RESTful way to consume my WS. I've been looking for one example, documentation or anything who explain the Idempiere-way to consume the WS with REST, but I had not success. :(
I have a little experience with REST using Ruby, but I think there are no diference in Java.
I did some tests, but I'm little confused about it. In first test, I inject the URL (http://localhost:8081/ADInterface/services/rest/model_adservice/get_list)  directly in browser, I expected to receive the XML structure, but have returned a blank page.
In Java test with HttpURLConnection, error 500 throws directly in my face. :/
BUT, if I test HttpURLConnection with GET ResquestMethod in http://localhost:8081/ADInterface/services/rest?_wadl, I receive the XML structure.

Note: Yes, my port is 8081
Note 2: I could not find anything about how to consume Idempiere WS using REST.

Thanks. :)



Henrique A. Lavezzo

unread,
Aug 12, 2015, 1:55:03 PM8/12/15
to iDempiere
Quick update: My test in http://localhost:8081/ADInterface/services/rest?_wadl, is a control test.

Daniel Tamm

unread,
Aug 12, 2015, 1:55:24 PM8/12/15
to idem...@googlegroups.com
I use REST the OSGI-way since iDempiere runs in an OSGI-container. If you google REST and OSGI I think you can get started. I don't have any good examples at hand but that's how I did it.

I didn't use any existing WS-services but did my own. It was the easiest way for my implementation.

/Daniel
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/7efc9bf3-d65d-4e1e-bdf0-cfa3744c3484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
Notima AB
Lärjungevägen 6
SE-136 69 Vendelsö
Tel: +46 8 776 31 30 Fax: +46 8 712 95 73
Email: in...@notima.se - Web: http://www.notima.se/
--

Henrique A. Lavezzo

unread,
Aug 12, 2015, 2:18:42 PM8/12/15
to iDempiere
In my implementation, I wanted to Idempiere to provide my WS, but I've considered create my own  implementation.
Reply all
Reply to author
Forward
0 new messages