Hi all, 

I'm using Xfire with pojos (as in the BookService example i've found in the
examples directory of the binary distribution) and
i'm cope with a problem i cannot solve. Maybe someone could explain me what
i've missed or what i've done wrong.

Description of the problem:

The problem occurs when i use one of my custom class in parameter of the
service i'd like to expose as
a webservice:


"public String myMethod(MyClassWithProblem myClass);"

In fact, the problem seems to be nested in "MyClassWithProblem".
This class does not use any Collection (List, Map...) but it implements some
interfaces and is located in a jar file:


import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
import fr.test.common.pub.MyInterface;


public class MyClassWithProblem
    implements Comparable, Serializable, MyInterface{

        ....some basic code....
        
}


and the code of MyInterface looks like that (it does nothing for the moment,
but it should be use in the future):

public interface MyInterface{
        ...does nothing...
}




Here's the stack trace given when i try to access the wsdl through my
internet browser:

java.lang.ClassCastException
        at
org.codehaus.xfire.aegis.type.basic.BeanType.getSuperType(BeanType.java:756)
        at
org.codehaus.xfire.aegis.type.basic.BeanType.writeSchema(BeanType.java:486)
        at
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:224)
        at
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
        at
org.codehaus.xfire.wsdl.AbstractWSDL.addDependency(AbstractWSDL.java:233)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParametersSchema(WSDLBuilder.java:575)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocumentType(WSDLBuilder.java:549)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createWrappedInputParts(WSDLBuilder.java:517)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createInputMessage(WSDLBuilder.java:312)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createAbstractInterface(WSDLBuilder.java:216)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilder.write(WSDLBuilder.java:151)
        at
org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(WSDLBuilderAdapter.java:40)
        at org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java:104)
        at
org.codehaus.xfire.transport.http.XFireServletController.generateWSDL(XFireServletController.java:377)
        at
org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:126)
        at
org.codehaus.xfire.transport.http.XFireServlet.doGet(XFireServlet.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:536)
        
        I've tried to use the
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
(but same result)
        
        
        I'm using:
        
        Windows XP pro
        Eclispe 3.2
        jdk 1.4.2_12 (I've tried other versions of jdk1.4.2: but same result...)
        maven 2.0.4
        xFire 1.2.2 (i've tried 1.2.4: same result)
        tomcat 5.0.28
        
        
        NB: Constraints : using jdk 1.4.2
        
        I really need help because for the moment, i cannot use Xfire in my
project, and if there's no solution i will be oblige to drop this
framework... i cannot wait more
        or take risk to use it if there's no solution...
        
        
        Best regards.
        
        
        Alex.
-- 
View this message in context: 
http://www.nabble.com/ClassCastException...-tf2951445.html#a8254446
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to