Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1758

Simple front end does not figure out generic implementation beans.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.2.6
    • Simple Frontend
    • None
    • linux debian stable (etch) tomcat 5.5.20-2etch3

    • Advanced

    Description

      The real issue in the description below is that the SimpleFrontEnd is not dealing with an implementation bean like

      MyClass<String> as it must. It isn't figuring out the actual types, it's just allowing type erasure to mislead it into treating all instances of the type parameters as Object, which is to say xsd:anyType. This happened to trigger an obscure explosion in the Javascript generator.

      If anyone wants to fix this badly enough, they need to contemplate

      List<P> doSomething(P someItem)

      in terms of the complexity of the code that will trace that P down there in the list up to the SEB.

      I managed to get a javascript client example working but it barfs in some cases.

      All my server classes are pojos and I am using the simple frontend (I think) with Aegis. I am very pleased with java2java communication since I can pass complex types with no annotations at all.

      The problematic cases are of the form. (All other cases are working with js client)

      public interface Service<T, P> {
      public int open(P args);

      public void close(int handle);

      public int getValue(int handle);
      }

      My guess is it barfs in the generic P type argument.

      When I am trying to do http://localhost/ws/SomeService?js tomcat produces an error

      Aug 20, 2008 7:14:43 AM org.apache.cxf.transport.servlet.ServletController invoke
      WARNING: org.apache.cxf.javascript.JavascriptQueryHandler Exception caught writing response.
      java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaType cannot be cast to org.apache.ws.commons.schema.XmlSchemaComplexType
      at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.deserializeElement(SchemaJavascriptBuilder.java:610)
      at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.domDeserializerFunction(SchemaJavascriptBuilder.java:413)
      at org.apache.cxf.javascript.types.SchemaJavascriptBuilder.generateCodeForSchema(SchemaJavascriptBuilder.java:102)
      at org.apache.cxf.javascript.JavascriptQueryHandler.writeResponse(JavascriptQueryHandler.java:135)
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:152)
      at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:174)
      at org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
      at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)
      at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            vasvir Vassilis Virvilis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: