5 Replies Latest reply on Jan 26, 2005 9:00 AM by Gurprit Singh

    Java Service Endpoints  - JBOSS says "Class is not a servlet

    Jason Greene Master


      "AW" wrote:
      In the wiki at:

      It states that:
      "Note, the service endpoint implementation is defined in the <servlet-class> element. This is highly confusing because it is not a servlet at all, but a simple plain java object."

      I have done this (I think properly), but when I try to invoke the web service, JBOSS tries to cast my JSE to a Servlet - this obviously fails, and a ClassCastException is thrown.

      Is the wiki wrong?


      Your javabean that you put in the servlet-class tag has to be a class that implements your service endpoint interface, not the interface itself, and not a class that extends HttpServlet.


        • 1. Re: Java Service Endpoints  - JBOSS says
          Adrian Wilford Newbie

          Unfortunately, this does not solve my problem - just check and it is as you say:

          In my <servlet-class> element, I have specified the normal Java class that Implements the JSE Interface (This class does not extend HTTPServlet).


          p.s. I posted the original topic - I have just registered now.

          • 2. Re: Java Service Endpoints  - JBOSS says
            Thomas Diesler Master

            You could have a look at the samples that are provided with JBossWS

            • 3. Re: Java Service Endpoints  - JBOSS says
              Gurprit Singh Newbie

              I have done all mentioned on the page. But when i try to deploy it doesn't pick the Web Service at all

              Please help me

              The logs are
              11:33:06,438 INFO [EARDeployer] Init J2EE application: file:/C:/java/JBoss/jboss-4.0.0/server/standard/deploy/wraptools.ear
              11:33:11,797 INFO [EjbModule] Deploying InvestmentEJB
              11:33:11,813 INFO [EjbModule] Deploying RiskAssessEJB
              11:33:11,860 INFO [EJBDeployer] Deployed: file:/C:/java/JBoss/jboss-4.0.0/server/standard/tmp/deploy/tmp33904wraptools.ear-contents/wraptools.jar
              11:33:11,891 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/C:/java/JBoss/jboss-4.0.0/server/standard/tmp/deploy/tmp33904wraptools.ear-contents/wraptools-exp.war/
              11:33:12,954 INFO [EARDeployer] Started J2EE application: file:/C:/java/JBoss/jboss-4.0.0/server/standard/deploy/wraptools.ear
              11:33:12,954 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
              Packages waiting for a deployer:
              org.jboss.deployment.DeploymentInfo@be0117b0 { url=file:/C:/java/JBoss/jboss-4.0.0/server/standard/tmp/deploy/tmp33902wrap.ear-contents/ejb-jar-ic.jar-contents/lib/xdoclet-ws.jar }
              deployer: null
              status: Starting
              state: START_SUBDEPLOYMENTS
              watch: file:/C:/java/JBoss/jboss-4.0.0/server/standard/tmp/deploy/tmp33902wrap.ear-contents/ejb-jar-ic.jar-contents/lib/xdoclet-ws.jar
              altDD: null
              lastDeployed: 1106307181938
              lastModified: 1106307181923

              11:33:13,063 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-
              11:33:13,172 INFO [ChannelSocket] JK2: ajp13 listening on /
              11:33:13,172 INFO [JkMain] Jk running ID=0 time=0/31 config=null
              11:33:13,188 INFO [Server] JBoss (MX MicroKernel) [4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)] Started in 27s:890ms

              • 4. Re: Java Service Endpoints  - JBOSS says
                Thomas Diesler Master

                Actually the JSE does not need to implement the SEI, but there is no harm either.

                What is xdoclet-ws.jar ? Is this your JSE, if yes it should be a valid WAR deployment.

                • 5. Re: Java Service Endpoints  - JBOSS says
                  Gurprit Singh Newbie

                  Thanx Thomas
                  I got it
                  There was some problem in webservices.xml