2 Replies Latest reply on Nov 14, 2008 6:38 AM by Emil Nilimaa

    How to generate the WSDL at build time for EJB3 based web se

    Raghu Gandhi Newbie

      I am exposing a Stateless Session Bean as a web service using following annotations and would like to capture WSDL during build time. Currently, the wsdl is getting generated at deployment. Is there a way to generate it before deployment for EJB3 based web services?

      I am using jbossws-3.0.1-native-2.0.4.GA in Jboss portal 2.6.6GA

      Example EJB3 WS:

      @Stateless
      @WebService( targetNamespace = "http://www.xyz.com/product/services/AdminFacade" )
      @SOAPBinding( style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL )
      public class AdminFacadeBean implements AdminFacadeLocal, AdminFacadeRemote
      {
      //methods here
      }

      Thanks,
      rjdbvc

        • 2. Re: How to generate the WSDL at build time for EJB3 based we
          Emil Nilimaa Newbie

          Hmm, i have the same question.

          But is it really necessary to use the wsprovide tool. From the wiki it says:


          A JSE or EJB3 deployment can be built using this class, and it is the only Java code needed to deploy on JBossWS. The WSDL, and all other Java artifacts called "wrapper classes" will be generated for you at deploy time. This actually goes beyond the JAX-WS specification, which requires that wrapper classes be generated using an offline tool. The reason for this requirement is purely a vender implementation problem, and since we do not believe in burdening a developer with a bunch of additional steps, we generate these as well. However, if you want your deployment to be portable to other application servers, you will unfortunately need to use a tool and add the generated classes to your deployment.

          This is the primary purpose of the wsprovide tool, to generate portable JAX-WS artifacts. Additionally, it can be used to "provide" the abstract contract (WSDL file) for your service. This can be obtained by invoking wsprovide using the "-w" option:


          From which i get the impression i would not need to use any other tools...
          Or is it so that the CLIENT will need the generated classes from wsprovide to be able to use the webservice?