camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: cxfrs swagger
Date Mon, 22 Feb 2016 10:24:17 GMT

On 19/02/16 16:27, camel_case wrote:
> Just to clarify, I could use swagger with cxf, but not cxfrs and camel?  Is
> there no work around using the cxf with swagger examples to let swagger know
> about the route url by assignment as in the example below ( so far as I
> tried this, trouble of this nature:
> Caused by: java.lang.ClassCastException:
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator cannot be cast to
> javax.ws.rs.container.ContainerRequestFilter )
This is a very strange error, looks like you may not have jaxr20 api on 
the classpath; and you should also exclude cxf-rt-rs-service-description 
to avoid a WADl generator be loaded in the 1st place

Sergey

>
> (using this from your link http://cxf.apache.org/docs/swagger2feature.html)
> import org.apache.cxf.frontend.ServerFactoryBean;
> import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
> ...
>
>      Swagger2Feature feature = new Swagger2Feature();
>
>      // customize some of the properties
>      feature.setBasePath("/api");
>
>      // add this feature to the endpoint (e.g., to ServerFactoryBean's
> features)
>      ServerFactoryBean sfb = new ServerFactoryBean();
>      sfb.getFeatures().add(feature);
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/cxfrs-swagger-tp5777892p5777938.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

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

Mime
View raw message