I'm currently trying to think about Java EE 5. What I would like to do is create an example application that
- offers a simple unscreened EJB (for example, a simple calculator with the add () method)
- set this add method as a web service
- consume this web service from another EJB
The first two steps are simple, and I can deploy and test this bean on Glassfish v2.1 already and test it using a standalone client:
@WebService
@Stateless
public class CalculatorWS {
@WebMethod
public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j) {
int k = i + j;
return k;
}
}
What I am not getting is how to use such a web service from the second EJB. Although this is not very useful in this example, I will need to write some EJBs soon that will cover external web services so that my internal clients cannot deal with these external resources.
, , - EJB? . , , : -)
, Eclipse 3.5.