5 Replies Latest reply on Mar 17, 2006 2:24 PM by avlevy2k

    Confused: JBoss 4.0.4RC1, JBossWS, EJB3

    patrick_ibg

      I've been trying to gather some information on how to deploy/use webservices on JBoss and am rather confused... I'm trying to get web services working with EJB3.

      - I take it that JBossWS is not supported in JBoss 4.0.3SP1, however it apparently works fine in 4.0.4 RC1.
      - From the Wiki, there is only one sample that shows how to use EJB3 with JBoss web services... ejb3webservices.zip. However this was done on JBoss 4.0.3...

      Can anyone point me to an example of how to use JBoss AS (version 4.0.4 RC1) using the EJB3 configuration, with a webservices stack? Either JBossWS or ws4ee will do... My preference would be to use the annotated EJB3 SLSB endpoint, but I'll use whatever works...

      Thanks

        • 1. Re: Confused: JBoss 4.0.4RC1, JBossWS, EJB3
          thomas.diesler

           


          it apparently works fine in 4.0.4 RC1


          No it does not - it will be part of jboss-4.0.4 final

          The wiki you reference is not endorsed and has been removed.

          You can aleady try what is in CVS

          http://wiki.jboss.org/wiki/Wiki.jsp?page=WSDeployJBossWS

          • 2. Re: Confused: JBoss 4.0.4RC1, JBossWS, EJB3
            avlevy2k

            I'm new to JBoss and JBossWS.

            I'm trying to follow your deploy instructions but I have 2 problems:

            1. Under my jboss 4.0.4RC1 home dir I don't have a 'webservice' folder.
            2. I don't know where to find the ant build file. when lookling at the folder that holds the jbossws.sar I don't see any build file.

            Thanks,

            -- AV

            • 3. Re: Confused: JBoss 4.0.4RC1, JBossWS, EJB3
              anders.hedstrom

              my guess is that you have downloaded the binary distribution of JBoss 4.0.4RC1 and then as the wiki says:


              With the binary distribution, you will find the JBossWS service archives in

              ${jboss.home}/docs/examples/jbossws


              You can install it manually, this is also described in the wiki

              If you want to do this manually, these are the steps
              
               <!-- delete jboss-ws4ee implementation -->
               <delete dir="${jboss.home}/server/${server}/deploy/jboss-ws4ee.sar/"/>
               <delete file="${jboss.home}/client/jboss-ws4ee-client.jar"/>
               <delete file="${jboss.home}/client/axis-ws4ee.jar"/>
              
               <!-- install jbossws implementation -->
               <copy todir="${jboss.home}/client" file="${jboss.jbossws.lib}/jbossws-client.jar"/>
               <mkdir dir="${jboss.home}/server/${server}/deploy/jbossws.sar"/>
               <unjar dest="${jboss.home}/server/${server}/deploy/jbossws.sar" src="${jboss.jbossws.lib}/jbossws.sar"/>
              



              If you don't understand these instructions, here's an explanation

              1. delete the following files/directory (if present):
              ${jboss.home}/server/<server_config>/deploy/jboss-ws4ee.sar
              ${jboss.home}/client/jboss-ws4ee-client.jar
              ${jboss.home}/client/axis-ws4ee.jar

              2. Create a new directory called jbossws.sar at this location ${jboss.home}/server/<server_config>/deploy/
              3. Extract the contents of the file ${jboss.home}/docs/examples/jbossws/jbossws.sar into the directory you just created
              4. Copy the file ${jboss.home}/docs/examples/jbossws/jbossws-client.jar to ${jboss.home}/client


              Hope this helps




              • 4. Re: Confused: JBoss 4.0.4RC1, JBossWS, EJB3
                avlevy2k

                I tried to do that, and took a web service I created and deployed to JBoss5.0.0alpha, and deployed it to my 4.0.4RC1.

                When trying to go to http://enalhl:8080/jbossws/services I get the following:

                HTTP Status 404 - Servlet ContextServlet is not available

                --------------------------------------------------------------------------------

                type Status report

                message Servlet ContextServlet is not available

                description The requested resource (Servlet ContextServlet is not available) is not available.


                --------------------------------------------------------------------------------

                Apache Tomcat/5.5.12

                • 5. Re: Confused: JBoss 4.0.4RC1, JBossWS, EJB3
                  avlevy2k

                  In addition, when I look at the console, this is what I see:

                  14:14:22,415 INFO [EJB3Deployer] Deployed: file:/C:/Program Files/jboss-4.0.4RC1/server/default/deploy/ImportService.ejb3
                  14:15:00,301 INFO [[/jbossws]] Marking servlet ContextServlet as unavailable
                  14:15:00,301 ERROR [[ContextServlet]] Allocate exception for servlet ContextServlet
                  java.lang.NoClassDefFoundError: javax/xml/rpc/JAXRPCException
                  at java.lang.Class.getDeclaredConstructors0(Native Method)
                  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
                  at java.lang.Class.getConstructor0(Class.java:2640)
                  at java.lang.Class.newInstance0(Class.java:321)
                  at java.lang.Class.newInstance(Class.java:303)
                  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
                  at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
                  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
                  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                  at java.lang.Thread.run(Thread.java:595)