Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 75595 invoked from network); 24 May 2007 06:37:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 May 2007 06:37:38 -0000 Received: (qmail 26256 invoked by uid 500); 24 May 2007 06:37:42 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 26188 invoked by uid 500); 24 May 2007 06:37:42 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 26122 invoked by uid 99); 24 May 2007 06:37:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 23:37:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 23:37:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 490AD71403F for ; Wed, 23 May 2007 23:37:16 -0700 (PDT) Message-ID: <7044635.1179988636296.JavaMail.jira@brutus> Date: Wed, 23 May 2007 23:37:16 -0700 (PDT) From: "Freeman Fang (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Created: (CXF-680) rest binding should support class without XmlRootElement MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org rest binding should support class without XmlRootElement -------------------------------------------------------- Key: CXF-680 URL: https://issues.apache.org/jira/browse/CXF-680 Project: CXF Issue Type: Improvement Reporter: Freeman Fang currently, we need provide class XmlRootElement annotation for rest binding, otherwise we will get exception like INFO: Interceptor has thrown exception, unwinding now java.lang.ClassCastException: org.apache.ws.commons.schema.XmlSchemaComplexType at org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:129) at org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:105) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:147) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:63) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:220) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:180) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:690) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) The reason is without @XmlRootElement, schema generated from the java class is XmlSchemaComplexType, but currently what we expect is XmlSchemaElement we can see oc = IriDecoderHelper.buildDocument((XmlSchemaElement)part.getXmlSchema(), schemas, params); cause this exception, part.getXmlSchema() return XmlSchemaComplexType if without @XmlRootElement more details are in the mail Hiya I got the following exception when querying the following URL of a modified version of the restful_http_binding sample. java.lang.ClassCastException : org.apache.ws.commons.schema.XmlSchemaComplexType The only change I made between this faulty version and a working one is about the GetBook class that was rewriten and compiled in Groovy. The schema generated in now instead of would these changes lead to that error ? My feeling is *no* since I did the same change for other classes and this did not cause the same exception. Thoughts ? Cheers Guillaume -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.