Avatar billede fredand Forsker
27. oktober 2015 - 14:37 Der er 6 kommentarer og
1 løsning

Best practice to create a WS in front of rmi-clients?

Hello guys!

I'm looking for the best way to create a webservice in front of a rmi-client.

You see we got system A, java 1.6 and jboss 5.0, that communicates with system B, java 1.6 and jboss 5.0, over remote ejb (RMI I guess).

For a long time ago developers from system B have provided a system-B-ejb-client.jar for developers in system A to use for the communication.

How ever now we need to upgrade system A to java 1.7 and jboss 5.2 and then the RMI does not work any more. Further more RMI is not accepted anymore in the integration architecure.

System B do not got any resources to upgrade as well or do any changes in system B at all. (It look's like they can not even present the source code!)

Therefore this might look like a solution:
We move the system-B-ejb-client.jar into system B itself. But infront, inside of system B, we put a webservice that forwards the request by calling the ejb with the system-B-ejb-client.jar.

But is there a way to maven-auto-generate a webservice upon class-files from a ejb-client-jar-file, like contract last?

Or do you guys see any easier solution?

Best regards
Fredrik
Avatar billede arne_v Ekspert
27. oktober 2015 - 14:45 #1
Add JAX-WS annotations to the relevant class and generate SOAP web service from that.
Avatar billede fredand Forsker
27. oktober 2015 - 15:51 #2
Hello Arne!

Thanks for your reply!

Since I do not got the source-code for the ejb-client-class I guess I need to create a "wrapper"-class?

What would you think about that?
Best regards
Fredrik
Avatar billede arne_v Ekspert
27. oktober 2015 - 16:04 #3
Yes.

I was assuming that you already had a class X in system A that did the JNDI lookup and called the remote interface.

And I was suggesting annotating that, pack it in a war and deploy it on B. Then JBoss will generate web service based on annotations.
Avatar billede fredand Forsker
27. oktober 2015 - 20:52 #4
Hello!
Thanks alot for your advice Arne!
I will try it out at once tomorrow!
Please leave a svar!
Best regards
Fredrik
Avatar billede arne_v Ekspert
27. oktober 2015 - 21:07 #5
If you need a quick intro to SOAP annotations then check out:

http://www.eksperten.dk/guide/1590

under test3.
Avatar billede arne_v Ekspert
27. oktober 2015 - 21:08 #6
answer (but wait accept until you know if it works)
Avatar billede fredand Forsker
29. oktober 2015 - 14:23 #7
Hello Arne!
It works fine!
/Best regards
Fredrik
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester