cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@progress.com>
Subject Re: How to support inheritance ?
Date Thu, 16 Oct 2008 09:35:30 GMT
Hi,

Please consider switching to jax-rs. Perhaps seeing the other cxf jax-rs pioneers struggling
to make things working with our JAX-RS 
being involved is not very encouraging :-), it's still a better move. We'll get the JAX-RS
issues sorted out eventually and I reckon 
that the inhertitance is supported quite well in our JAX-RS impl...

Cheers, Sergey

>
> Hi,
>
> For testing purposes, I made a minor change to the
> apache-cxf-2.1\samples\restful_http_binding example. I made the
> Customer.class extend from a SuperCustomer.class.
>
> package demo.restful.server;
> public class SuperCustomer {
>    protected String username;
>
>    public String getUserName() {
>        return username;
>    }
>
>    public void setUserName(String name) {
>        this.username = name;
>    }
> }
>
> Now when I execute "wget --post-file add.json
> http://localhost:8080/json/customers", I get the following exception. What
> needs to be changed to fix this issue ?
>
> Thanks,
> Praveen
>
>
> Oct 14, 2008 7:18:00 PM
> org.apache.cxf.binding.http.interceptor.DispatchInterceptor handleMessage
> INFO: Invoking POST on /customers
> Oct 14, 2008 7:18:00 PM
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
> handleMessage
> INFO: URIParameterInterceptor handle message on path [/customers] with
> content-type [application/x-www-form-urlencoded]
> Oct 14, 2008 7:18:00 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.NullPointerException
>        at
> org.apache.cxf.binding.http.IriDecoderHelper.interopolateParams(IriDecoderHelper.java:306)
>        at
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:122)
>        at
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:103)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>        at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>        at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:280)
>        at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:254)
>        at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
>        at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>        at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>        at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>        at org.mortbay.jetty.Server.handle(Server.java:324)
>        at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>        at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>        at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>        at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Oct 14, 2008 7:18:00 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.IllegalStateException: Invalid JSON namespace:
> http://cxf.apache.org/bindings/xformat
>        at
> org.codehaus.jettison.mapped.MappedNamespaceConvention.getJSONNamespace(MappedNamespaceConvention.java:151)
>        at
> org.codehaus.jettison.mapped.MappedNamespaceConvention.createKey(MappedNamespaceConvention.java:158)
>        at
> org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeStartElement(MappedXMLStreamWriter.java:239)
>        at
> org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:204)
>        at
> org.apache.cxf.binding.xml.interceptor.XMLFaultOutInterceptor.handleMessage(XMLFaultOutInterceptor.java:61)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
>        at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
>        at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>        at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:280)
>        at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:254)
>        at
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
>        at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
>        at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
>        at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>        at org.mortbay.jetty.Server.handle(Server.java:324)
>        at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
>        at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>        at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
>        at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>
> -- 
> View this message in context: http://www.nabble.com/How-to-support-inheritance---tp20005070p20005070.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
> 


Mime
View raw message