Calling a REST Service from a Session Bean

Latest response

Hello,

I'd like to call a REST service out of a session bean in my application running in a eap 6.2.
What's the best way to do this? A lot of Resteasy jars are also part of eap. Does someone has an example?

Thanks,

Mike

Responses

Hi Mike

Are you asking how to to use RESTEasy within EAP or do you need a concrete example of how to implement a JAX-RS client? I'm going to presume the latter in which case please take a look at the documentation here [1]. There is also an example of the jax-rs client in our quickstarts.

[1] http://docs.jboss.org/resteasy/docs/2.3.7.Final/userguide/html_single/#RESTEasy_Client_Framework

Hi Mustafa,

thanks for the link. Yeah I wanted to know, if there is something special in building a REST-Client inside the JBoss. We found a solution and builded one with RESTEasy. An older Version of the framework, but it works. With the newest version it's possible to do it much easier. The newest version could be used in the eap 6.2 as well, but we didn't want to go so far.

Hi Michel

Glad you got it working. Please be aware that support for components within EAP is only provided for them components if you use the same ones that the version of EAP was shipped with. From your comments it sounds like you're using an older version of RESTEasy with EAP 6.2.