This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Generate stubs for EJB3.1 bean exposed as webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Generate stubs for EJB3.1 bean exposed as webservice" Watch "Generate stubs for EJB3.1 bean exposed as webservice" New topic
Author

Generate stubs for EJB3.1 bean exposed as webservice

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Hello, I am trying to use Maven to generate stubs for an EJB3.1 bean exposed as a Webservice. My example is as follows; I have an EAR with a JAR containing my EJB3.1 bean and a WAR which contains a Servlet that access this bean as a webservice. The bean code is as follows:



From the Servlet I call the webservice as follows:



This works fine. However on some books and the Internet I also found examples using @WebReference to inject an instance in an object of type HelloService as follows.




However I cannot understand how to generate HelloService from HelloBean. From the Internet I found out that JBossWS - JAX-WS Tools wsconsume will generate HelloService.java when given a WSDL file. However I can't seem to make it work when giving it a bean. From my maven project I tried adding the following plugin definition (glassfish project):



However this only generate classes to represent all methods in HelloBean and their return values. In short I still did not manage to generate HelloService from HelloBean so that from my Servlet I can avoid boilerplate code.

Does anyone know how I can generate stubs for an EJB3.1 bean most importantly the xxxService class? Or at least correct me if my reasoning regarding this class is wrong.
 
 
subject: Generate stubs for EJB3.1 bean exposed as webservice
 
Similar Threads
Strange problem - works on maven glassfish but not on Tomcat
Tomcat and Axis2
JAX-WS wsgen using Maven2
Filtering problem using maven-read-properties plugin in pom.xml file
JAR for artifacts generated