6 Replies Latest reply on Feb 25, 2013 3:56 AM by Nicklas Karlsson

    How to deploy web service which are not packaged inside a war file in jboss 7

    Srimanta Maji Newbie

      Actually i want to deploy a soap based web service in Jboss 7. But i am facing following issue.Can anybody suggest me the way of resolving that issue.

      The following web service class is inside a jar file which is not pacakged inside the war file.

       

      @WebService(name = "TestService", serviceName = "TestService", portName = "TestService", targetNamespace = "http://services.globalids.com/")

      @SOAPBinding(style = SOAPBinding.Style.RPC)

      public class TestService {

          @WebMethod

          public void echo(String input) {

              System.out.println("JSEBean01.echo");

          }

      }

       

       

      <servlet>

              <servlet-name>TestService</servlet-name>

              <servlet-class>com.globalids.TestService</servlet-class>

          </servlet>

          <servlet-mapping>

              <servlet-name>TestService</servlet-name>

              <url-pattern>/services/TestService</url-pattern>

          </servlet-mapping>

       

      Issue :

      javax.servlet.ServletException: Class com.globalids.TestService is not a Servlet

      org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

      java.lang.Thread.run(Thread.java:619)

       

      root cause

      java.lang.ClassCastException: com.globalids.TestService cannot be cast to javax.servlet.Servlet
           org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
           org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
           org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
           org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
           org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
           java.lang.Thread.run(Thread.java:619)