I have a question about web services and EJB 3.0. I am very new to web services and hence appreciate all help possible. Here is my problem:
I would like to call a web service from a stateless session bean (ejb 3.0) the bean will be running on JBoss. I have the wsdl file defining the web service. I would like to do a solution using annotations and inject the service endpoint interface into my session bean.
Any one having any pointers on how to accomplish this?
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Joined: Apr 16, 2009
Thanks, though I still do not understand how I create the java interface for the web service I want to call (I am guessing I still need to create the corresponding java interface for the wsdl file).
I have tried to generate java code using wsdl2java (the Axis 2 program) but that gives me a bunch of java files that depend on other classes such “as org.apache.axis2.databinding.ADBBean”. I was hoping to be able to skip those parts and be able to call a web service just using a wsdl file and jboss without having to find all the jar-files necessary to solve all apache.axis2 dependencies.
I thought the process was:
1. Create a java interface for the web service (Still don’t know how to do this in an easy way from the wsdl file).
2. Inject the created java interface into the session bean
3. Use the interface to call the web service methods.
As I said before I am very new to web services and I am probably missing some steps?