1 Reply Latest reply on Jan 24, 2012 12:44 PM by spyhunter99

    Cannot create EJB-based web service with JBossWS runtime

    hicsuntleones

      Hi all,

      I am fairly new to JBoss but have some experience on Java EE so I apologize if this question is a bit newbie.

      I have done some research on the web but to no use. The problem is the following:

       

      I am on JBoss AS 5.1 and trying to create EJB based ws endpoint using JBossWS runtime.

      Eclipse is 3.5, JBoss tools is 3.1

       

      JBoss tools plugin prevents me from using an EJB project as service project for WS generation.

      Allowed project types are "plain java" or "dynamic web project".

       

      On other JAX-WS runtimes this is perfectly possible, why is this happening?

       

      Thanks, regards

      Vincenzo

        • 1. Re: Cannot create EJB-based web service with JBossWS runtime
          spyhunter99

          This won't directly answer your question, but I'll share how I develop things. I use netbeans so you'll have to modify as necessary.

           

          create a new java library (jar file) projects

          open a command prompt

           

          use wsconsume from the jbossws bundle and point it at your wsdl files with the -k option (keep source code)

          copy the files from the output folder to your projects src folder

           

          flip back to the ide. Find the class that defines the interface representing your wsdl

          Make a new class, implementing that interface

          I'd suggest copying all of the annotations from the interface definition into your implementation.

          Add a jar reference to the class jboss ejb api, jboss-ejb-api_3.1_spec.jar

          Add @javax.ejb.Stateless to your impl class

          write your code

          build

          copy jar file into the deploy folder

           

           

          that's it