cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1758) javascript client generation barfs at generic types
Date Thu, 21 Aug 2008 23:40:44 GMT

    [ https://issues.apache.org/jira/browse/CXF-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624522#action_12624522
] 

Benson Margulies commented on CXF-1758:
---------------------------------------

I tried to come up with a test case, but it resolutely refuses to fail. Please actually concoct
a failing test case and add it here.


> javascript client generation barfs at generic types
> ---------------------------------------------------
>
>                 Key: CXF-1758
>                 URL: https://issues.apache.org/jira/browse/CXF-1758
>             Project: CXF
>          Issue Type: Bug
>          Components: JavaScript Client
>    Affects Versions: 2.1.2
>         Environment: linux debian stable (etch) tomcat 5.5.20-2etch3
>            Reporter: Vassilis Virvilis
>
> 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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message