[jboss-user] [JBossWS] - ClassCastException in HandlerResolverImpl.addHandler

jtestori do-not-reply at jboss.com
Tue Nov 13 11:43:01 EST 2007


i have a simple webservice on jboss-4.2.0.GA with jbossws-2.0.1

my webservice:

  | package my.ws;
  | 
  | import javax.jws.HandlerChain;
  | import javax.jws.WebMethod;
  | import javax.jws.WebService;
  | 
  | @WebService
  | @HandlerChain(file = "WEB-INF/jaxws-handlers.xml")
  | public class MyWS {
  | 
  | 	@WebMethod
  | 	public String hello(String input) {
  | 		return input;
  | 	}
  | 
  | }
  | 

my handler:

  | package my.ws;
  | 
  | import javax.xml.namespace.QName;
  | import javax.xml.rpc.handler.GenericHandler;
  | import javax.xml.rpc.handler.MessageContext;
  | 
  | public class MyWSHandler extends GenericHandler {
  | 
  | 	public MyWSHandler() {
  | 		super();
  | 	}
  | 
  | 	public QName[] getHeaders() {
  | 		return new QName[] {};
  | 	}
  | 
  | 	public boolean handleRequest(MessageContext msgContext) {
  | 		return true;
  | 	}
  | 
  | 	public boolean handleResponse(MessageContext msgContext) {
  | 		return true;
  | 	}
  | }
  | 

jaxws-handlers.xml:

  | <handler-chains 
  | 	xmlns="http://java.sun.com/xml/ns/javaee"
  | 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
  | 	
  | 	<handler-chain>
  | 		<protocol-bindings>##SOAP11_HTTP</protocol-bindings>
  | 		<handler>
  | 			<handler-name>Application Server Handler</handler-name>
  | 			<handler-class>my.ws.MyWSHandler</handler-class>
  | 		</handler>
  | 	</handler-chain>
  | 	
  | </handler-chains>
  | 
  | 

the exception:

  | 17:39:43,296 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
  | java.lang.ClassCastException: my.ws.MyWSHandler
  | 	at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.addHandler(HandlerResolverImpl.java:148)
  | 	at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.initHandlerChain(HandlerResolverImpl.java:134)
  | 	at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:80)
  | 	at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
  | 	at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
  | 	at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  | 	at java.lang.Thread.run(Thread.java:595)
  | 

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

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



More information about the jboss-user mailing list