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 Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Question on EJB based Webservice - Unable to run WSGEN against session bean 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 » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Question on EJB based Webservice - Unable to run WSGEN against session bean" Watch "Question on EJB based Webservice - Unable to run WSGEN against session bean" New topic
Author

Question on EJB based Webservice - Unable to run WSGEN against session bean

Rajani Gummadi
Ranch Hand

Joined: Dec 17, 2010
Posts: 48
Hi,

I could not find any appropriate subject line, suitable for my question, but would try to make my actual question as clear as possible.

First of all, I have not worked in EJB3 anytime before and not familiar with the annotations.

With an assumption that, the approach for EJB based is same as Servlet based, I tried to implement ejb based end point.

1) I selected EJB project in eclipse and container chosen was Glassfish v3.
2) I coded my interface and impl beans as below



3) My project structure is as follows


4) build.xml is basically same as what Ivan provided in his notes, but the snippet is


Upon running the build.xml, I see that wrapper objects for request and response were created but, it did not generate any WSDL and see the following error


Can some one help me here ? error: Could not create declaration for annotation type javax.ejb.Stateless, what does this mean.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I think the main problem is that you refer to the WSDL in the @WebService annotation. wsgen will process the annotations, but at that time, there is no WSDL. Have you tried removing the WSDL reference in the annotation?
Do you have any particular requirements that causes you to use a "manually" created WSDL, instead of using one GlassFish creates at deployment time?
Here is the absolute simplest example I have been able to come up with having an EJB implement a web service:
1. In Eclipse, create an EJB Project.
2. Implement the EJB:

3. Publish it to GlassFish.

Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on EJB based Webservice - Unable to run WSGEN against session bean
 
Similar Threads
java.io.IOException:CreateProcess error=5, Access is denied(While running build.xml in Ant editor)
How to generate WSDL file for any JAX-WS?
Question on MTOM - The image is returned inline instead of an attachment.
Why my schema not defining a complex class definition, during WSGEN ?
wscompile - how to generate wsdl from service endpoint