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

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

    jason.greene

       

      "AW" wrote:
      Hi,
      In the wiki at:
      http://www.jboss.org/wiki/Wiki.jsp?page=WSServerJSE

      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?

      Thanks,
      AW


      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.

      -Jason


        • 1. Re: Java Service Endpoints  - JBOSS says

          Hi,
          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).

          Thanks,
          Adrian

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

          • 2. Re: Java Service Endpoints  - JBOSS says
            thomas.diesler

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

            • 3. Re: Java Service Endpoints  - JBOSS says
              jeepee_in1

              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
              mbeans:


              11:33:13,063 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
              11:33:13,172 INFO [ChannelSocket] JK2: ajp13 listening on /0.0.0.0:8009
              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

                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
                  jeepee_in1

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