5 Replies Latest reply on Sep 6, 2006 3:55 AM by Marco

    JBossWS and xdoclet with ejb

    Marco Novice

      hi all,
      i am trying to expose an EJB via webserviecs using XDoclet....
      i have checked plenty of docs on the wbe on how to do that... and basically i end up with 2 different way of doing that:
      - one where , using xdoclet, we generate proper ejb-jar.xml,then wsdl file, mapping.xml and webservices.xml
      - another where xdoclet is not used at all, but it uses jbossws annotations..

      i am tyring to move my EJBs/webservices from WAS to JBoss, could anyone tell me which of the two approaches shall i follow? i am finding more docs on the first option, but there are not much examples left out
      could anyone help me out?
      thanks in advance and regards

        • 2. Re: JBossWS and xdoclet with ejb
          Marco Novice

          Hello Thomas,
          thanks for your reply.. Unfortunately, i am trying to port an existing app (done with j2ee 1.3, currently deploying on websphere) to jboss..

          THE problem i have is that i have more than 1 webservice in the same application, and putting them in the same wsdl-config results in one ws overriding the other in webservices.xml ...
          i m using xdoclet just to build ejb classes and endpoint interfaces, i had to fight a little to find out how to generate webservices.xml etc.
          foudn this jira about my problem


          it will actually solve my problem... JIRA is marked as resolved, so will it be enough if i get the latest jboss app server from svn?

          thanks and regards

          • 3. Re: JBossWS and xdoclet with ejb
            Marco Novice

            i have just downloaded jbossws-1.0.3GA, and installed jars properly in my jboss directories

            i am currently using Maven2, to build my application, here' sthe ant task that i have defined

             <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
             <classpath refid="maven.dependency.classpath"/>
             <fileset dir="${jboss.libdir}\client">
             <include name="activation.jar"/>
             <include name="javassist.jar"/>
             <include name="jbossall-client.jar"/>
             <include name="jbossretro-rt.jar"/>
             <include name="jboss-backport-concurrent.jar"/>
             <include name="jbossws-client.jar"/>
             <include name="jboss-xml-binding.jar"/>
             <include name="jbossws14-client.jar"/>
             <include name="log4j.jar"/>
             <include name="mail.jar"/>
             <fileset dir="${jboss.libdir}\lib\endorsed">
             <include name="*.jar"/>
             <echo message="********** Running jboss ws **************"/>
             <mkdir dir="dd/ws" />
             <wstools dest="D:/Sw/step-by-step/middleware/dd/ws"
             <wstools dest="D:/Sw/step-by-step/middleware/dd/ws"

            here's my config files

            <configuration xmlns="http://www.jboss.org/jbossws-tools">
             <service name="TranslationService" style="rpc" endpoint="webservices.TranslationService"/>
             <namespaces target-namespace="http://mw.com/translationservice"
             <mapping file="tss-mapping.xml"/>
             <webservices ejb-link="TranslationServiceSessionBean" override="false"/>

            <configuration xmlns="http://www.jboss.org/jbossws-tools">
             <service name="MessengerService" style="rpc" endpoint="webservices.MessengerService"/>
             <namespaces target-namespace="http://mw.com/messengerservice"
             <mapping file="mss-mapping.xml"/>
             <webservices ejb-link="ResponderBean" override="false"/>

            but the webservice that gets generated shows only the last service (the translation service)

            am i missingn something? am i using wrong jar files in the classpath?

            can anyone help me out?

            thanks and regards

            • 4. Re: JBossWS and xdoclet with ejb
              Alejandro Guizar Master

              Hi Marco,


              <webservices ejb-link="ResponderBean" append="true"/>

              instead of:
              <webservices ejb-link="ResponderBean" override="false"/>

              • 5. Re: JBossWS and xdoclet with ejb
                Marco Novice

                THanx alex, it worked just fine!!