cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: WADL Json Error
Date Tue, 03 Jun 2014 09:56:08 GMT
Hi
On 27/05/14 15:15, anthony1975 wrote:
> Hello
>
> When i try to dislay wadl with json format (Xml is
> correct)...http://localhost:8080/wsSCC/api/users/?_wadl&_type=json
>
> The result looks like this ....
>
>
>
> Is there a way to resolve this ?
>
>  From my spring-servlet.xml :
>
>
>
> Thanks :)
>
> System:
> - springframework.version : 3.2.3.RELEASE
> - cxf.version : 2.7.8
> - jackson.version : 2.0.2
>

right now it depends on a JSON provider be capable of transforming a DOM 
Document into JSON. CXF JSONProvider does it by relying on CXF DOM-aware 
XMLStreamWriter.

Can you configure JacksonJaxbProvider to support DOM ?

If not then you can do the following workaround:

Write a custom JAX-RS message body writer and init JacksonJaxbProvider. 
In its isWriteable method check if it is DOM Document, if yes, return 
false, otherwise delegate to JacksonJaxbProvider.isWriteable

Please temp disable Jackson to confirm you can have WADL in JSON format 
returned before doing a custom writer

Cheers, Sergey


>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/WADL-Json-Error-tp5744477.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message