You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by las <la...@gmail.com> on 2015/05/03 19:13:57 UTC
Auto generation of WADL
How do i enable auto-generation of WADL in JSON format?
I have added cxf-rt-rs-service-description dependency as well.
--
View this message in context: http://cxf.547215.n5.nabble.com/Auto-generation-of-WADL-tp5756919.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Auto generation of WADL
Posted by Sergey Beryozkin <sb...@gmail.com>.
Please see this test for more information:
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java;h=cf368062059d21624cab45bd7614c6789c02f41e;hb=HEAD
A JAXB generation needs to be disabled and the external JSON schema
referenced.
I guess I'll need to update the code to ignore JAXB generation if _json
is set...
Cheers, Sergey
On 09/05/15 17:49, las wrote:
> Hi Sergey,
>
> I have annotated my service classes with produces application/json and my
> models don't have any annotations.
>
> I have also included cxf-rt-rs-service-description - 3.0.0 dependency.
>
> I am sending HTTP Accept header as application/json and ?_wadl=&_type=json,
> it doesn't give the wadl in json format but in xml with escaped characters.
> I am not sure if i have to do anything in particular.
>
> Appreciate your response.
>
>
> Regards.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Auto-generation-of-WADL-tp5756919p5757159.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: Auto generation of WADL
Posted by las <la...@gmail.com>.
Hi Sergey,
I have annotated my service classes with produces application/json and my
models don't have any annotations.
I have also included cxf-rt-rs-service-description - 3.0.0 dependency.
I am sending HTTP Accept header as application/json and ?_wadl=&_type=json,
it doesn't give the wadl in json format but in xml with escaped characters.
I am not sure if i have to do anything in particular.
Appreciate your response.
Regards.
--
View this message in context: http://cxf.547215.n5.nabble.com/Auto-generation-of-WADL-tp5756919p5757159.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Auto generation of WADL
Posted by Sergey Beryozkin <sb...@gmail.com>.
Does it not work for you ? Let me know please what exactly are you
interested in
Cheers, Sergey
On 06/05/15 05:05, las wrote:
> Could you please elaborate a bit more?
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Auto-generation-of-WADL-tp5756919p5757041.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: Auto generation of WADL
Posted by las <la...@gmail.com>.
Could you please elaborate a bit more?
--
View this message in context: http://cxf.547215.n5.nabble.com/Auto-generation-of-WADL-tp5756919p5757041.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Auto generation of WADL
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
Set HTTP Accept to application/json, add a query _type=json if trying
from a browser.
It needs a bit more work though, hopefully I'll have a bit more time for
it after 3.1.0...
Cheers, Sergey
On 03/05/15 18:13, las wrote:
> How do i enable auto-generation of WADL in JSON format?
>
> I have added cxf-rt-rs-service-description dependency as well.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Auto-generation-of-WADL-tp5756919.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