[jboss-user] [JBossWS] - Jboss-5.0.0.Beta1 JSR-181 Endpoint ClassCastException

volna do-not-reply at jboss.com
Fri Feb 9 15:52:07 EST 2007


I am trying to deploy a WebService using JSR-181 with Jboss-5.0.0.Beta1. If I have understood correctly this includes support for JBossWS-2.0



package testService;

@WebService( serviceName="TestService", name="Testing",
             targetNamespace="urn:Testing" )
@SOAPBinding( style = SOAPBinding.Style.DOCUMENT,
              use = SOAPBinding.Use.LITERAL,
              parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
public class TestUI {
     @WebMethod()
     public String Test(String tString) {
          return "Hello " + tString;
     }
}

I have the following web.xml file

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    
        <servlet-name>TestService</servlet-name>
        <servlet-class>testService.TestUI</servlet-class>
    
    <servlet-mapping>
        <servlet-name>TestService</servlet-name>
        <url-pattern>/testService</url-pattern>
    </servlet-mapping>
</web-app>

I am getting the following error

javax.servlet.ServletException: Class testService.TestUI is not a Servlet
	org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
	org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:86)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
	java.lang.Thread.run(Thread.java:595)

root cause

java.lang.ClassCastException: testService.TestUI
	org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
	org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:86)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
	java.lang.Thread.run(Thread.java:595)


Any pointers to help me out are appreciated

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013891#4013891

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013891



More information about the jboss-user mailing list