Re: globally disabling/enabling REST?

2018-04-20 Thread nino martinez wael
would be very nice if it was default functionality..

On Tue, Mar 13, 2018 at 1:24 AM, Max Spring  wrote:

> I ended up implementing this via a ContainerRequestFilter:
>
> package org.example.filters;
>
> import org.example.engine.Engine;
>
> import javax.ws.rs.container.ContainerRequestContext;
> import javax.ws.rs.container.ContainerRequestFilter;
> import javax.ws.rs.core.Response;
> import java.io.IOException;
>
> public class OfflineModeFilter implements ContainerRequestFilter{
>
> private Engine engine;
>
> public void setEngine(Engine engine){
> this.engine = engine;
> }
>
> @Override
> public void filter(ContainerRequestContext requestContext) throws
> IOException{
> if (engine.isOfflineMode()){
> requestContext.abortWith(Response.status(Response.Status.
> SERVICE_UNAVAILABLE)
>   .entity("engine offline").build()
> );
> }
> }
> }
>
> ...and injecting the engine via Blueprint:
>
> 
>
>   
> 
>   
> 
>   
> 
>   
>
>availability="mandatory"/>
>
> 
>
> -Max
>
>
>
> On 02/20/2018 02:29 PM, Max Spring wrote:
>
>> I'm using CXF 3.1.3 with Karaf 3.0.5.
>> I have a engine which exposes its functionality via REST.
>>
>> My engine takes some time to properly start up.
>> I would like all my REST functions to always return 503 (Service
>> Unavailable)
>> while the OSGi container and my engine is starting up,
>> until my engine declares "up".
>>
>> Is there such a global flag to control CXF REST?
>>
>> Thanks!
>> -Max
>>
>>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: How to integrate swagger2feature into multiple JAX-RS servers?

2018-04-20 Thread nino martinez wael
Lu, will you also try to incorporate the 0.0.0.0 multibinding issue?

On Fri, Apr 20, 2018 at 6:32 AM, Dongfeng Lu 
wrote:

>  OK. I will. Thanks, Colm.
> On Thursday, April 19, 2018, 8:35:45 AM CDT, Colm O hEigeartaigh <
> cohei...@apache.org> wrote:
>
>  Please create a JIRA and attach the test-case so that we can track the
> problem.
>
> Colm.
>
> On Sun, Apr 15, 2018 at 10:14 PM, Dongfeng Lu 
> wrote:
>
> > Screenshots for today's posting, in word doc.
> > On Sunday, April 15, 2018, 4:10:55 PM CDT, Dongfeng Lu
> >  wrote:
> >
> >
> > Just realized all screenshots are removed in the posting, but zip files
> > seem to stay. Collected all screenshots in a word doc, and see if it
> stays.
> >
> > Thanks,
> > Dongfeng
> >
> > On Sunday, April 15, 2018, 3:47:32 PM CDT, Dongfeng Lu
> >  wrote:
> >
> >
> > 3 more screenshots.
> >
> > On Sunday, April 15, 2018, 3:45:04 PM CDT, Dongfeng Lu <
> dlu66...@yahoo.com>
> > wrote:
> >
> >
> > Colm,
> >
> > Thank you very much for your response.
> >
> > The funny thing is our existing application is XML based, and I did read
> > that CXF-6740. However, adding " > value="true"/>" to our project did exactly the same thing as in Figure 2
> in
> > the previous posting, that is, the Swagger UI displays the titles
> > correctly, but both pages do not have any method. See the screenshot
> > "Figure 6".
> >
> > As I was building a sample project using the XML configuration to
> > demonstrate it, I accidentally set the context root to an empty string ""
> > during the deployment of the project to a Tomcat server in Eclipse.
> > Suddenly, things seem to work correctly. I see methods as shown in
> "Figure
> > 7". This is a progress, however, we do need use a non-empty context root,
> > as we are building a WAR file, and that WAR file is supposed to work
> under
> > any context root. How should we do that?
> >
> > Since there is a little progress here, I made some changes under
> > "com.example.api.serverTwo". I moved the implementation class to be in
> the
> > same folder as its interface, that is, under "com.example.api.serverTwo.
> api"
> > and removed the folder "com.example.api.serverTwo.impl". I also added
> two
> > more interfaces and implementations as that resembles the our actural
> > application. See "Figure 8".
> >
> > Then my second issue. Keep using the empty context root for now, I can
> see
> > "Figure 9", "Figure 10", and "Figure 11". But these 3 screenshots look
> > exactly the same in the middle, displaying methods for 3 servers. I would
> > expect "Figure 9" to only contain TwoServer's methods, just like in
> > http://localhost:9080/twoServer?_wadl, not methods belonging to
> > "TwoServer_SubServer 1" or "TwoServer_SubServer 2". This is not correct.
> > Even the generated "curl  'http://localhost:9080/
> twoServer/twoServerSubOne'"
> > is wrong as there is NO "/twoServer/twoServerSubOne" in the wadl, and
> > running this command would get "404 Not Found". How can we limit it? Do
> we
> > have to move the 3 sets of interfaces and implementations into their own
> > folders?
> >
> > The third issue I have is that we used to have "@Path("")" for all our
> > interfaces, even for interfaces in the same package, as the "address"
> > attribute in  has already defined "root" path for the
> > interface, why do we need to add another layer. However, if I use
> > "@Path("")" for the 3 interfaces under "serverTwo", all 3 would only
> > display "TwoServer_SubServer 2" as shown in "Figure 12". I guess we just
> > have to move the 3 sets of interfaces and implementations into their own
> > folders. Any other solution?
> >
> > The attached project has the code to reproduce the above finding. It is
> an
> > ANT + Ivy project. BTW, I am using CXF 3.1.11, the project is developed
> and
> > deployed to Tomcat in Eclipse.
> >
> > Thanks for your help.
> > Dongfeng
> >
> >
> >
> > On Thursday, April 12, 2018, 11:30:13 AM CDT, Colm O hEigeartaigh <
> > cohei...@apache.org> wrote:
> >
> >
> > I think when you have the two separate endpoints it's necessary to set
> the
> > setUsePathBasedConfig value to "true", otherwise you end up with some
> > caching of APIs. The following JIRA explains it better:
> >
> > https://issues.apache.org/jira/browse/CXF-6740
> >
> > It seems that the problem with "setUsePathBasedConfig" is set to true
> might
> > be unique to spring-boot, as the following CXF demo sets it to true for
> > multiple endpoints in Tomcat and it appears to work correctly:
> >
> > https://github.com/apache/cxf/blob/master/distribution/src/
> > main/release/samples/jax_rs/description_swagger2_web/src/
> > main/webapp/WEB-INF/context.xml
> >
> > Could you create a JIRA for it and attach the test-case?
> >
> > Colm.
> >
> >
> >
> > On Wed, Apr 11, 2018 at 6:27 PM, Dongfeng Lu  >
> > wrote:
> >
> > > Let me explain a little bit more about the 

Re: DOSGI Intents

2018-04-18 Thread nino martinez wael
Christian did you get an chance too look at it?

On Tue, Apr 17, 2018 at 12:52 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> yes I know that :) Am already using it..
>
> I've cloned the repo to prepare for the PR.. But are in doubt on howto
> make the  ip multi binding detection work here : https://github.com/TDC-
> Netdesign/cxf-dosgi/blob/master/provider-rs/src/main/
> java/org/apache/cxf/dosgi/rest/intents/SwaggerIntent.java#L62
>
> If we do not handle it, IP will be 0.0.0.0 and all swagger executions will
> fail. It has to be a real IP or host name.
>
> Can you take a look and give feedback.. I've just "dumped" the intents
> into the rest provider, as they both are rest specific.. I am also testing
> to see if I can avoid pulling in hibernate for bean validation (and let it
> be up to the user to choose), there is a hard binding for jackson though..
>
> regards Nino
>
>
>
> On Tue, Apr 17, 2018 at 10:43 AM, Christian Schneider <
> ch...@die-schneider.net> wrote:
>
>> You can check the new logging feature for an example how it registers
>> itself using a featue.
>> Btw. The logging intent is registered by default already.
>> See:
>> https://github.com/apache/cxf/blob/master/rt/features/loggin
>> g/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java#L89
>>
>> Christian
>>
>> 2018-04-17 10:35 GMT+02:00 nino martinez wael <
>> nino.martinez.w...@gmail.com>
>> :
>>
>> > Ahh I did not think of that... I'll verify if its viable..
>> >
>> > On Tue, Apr 17, 2018 at 10:07 AM, Christian Schneider <
>> > ch...@die-schneider.net> wrote:
>> >
>> > > If your intent is a cxf Feature then you can access the endpoint data
>> > > during your setup.
>> > >
>> > > Best
>> > > Christian
>> > >
>> > > 2018-04-17 10:03 GMT+02:00 nino martinez wael <
>> > > nino.martinez.w...@gmail.com>
>> > > :
>> > >
>> > > > Are there no way for an intent to get in contact with the service /
>> > > > endpoint it's being asked to setup?
>> > > >
>> > > > --
>> > > > Best regards / Med venlig hilsen
>> > > > Nino Martinez
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > --
>> > > Christian Schneider
>> > > http://www.liquid-reality.de
>> > >
>> > > Computer Scientist
>> > > http://www.adobe.com
>> > >
>> >
>> >
>> >
>> > --
>> > Best regards / Med venlig hilsen
>> > Nino Martinez
>> >
>>
>>
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Computer Scientist
>> http://www.adobe.com
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: 10 years of CXF - Happy Birthday!

2018-04-17 Thread nino martinez wael
Keep up improving and moving forward for this great project.. What's been
done so far are great..:)

On Tue, Apr 17, 2018 at 10:58 AM, Jose María Zaragoza 
wrote:

> 2018-04-16 20:15 GMT+02:00 Dennis Kieselhorst :
> > Hi,
> >
> > it's time to celebrate: 10 years ago, on April 16th in the year 2008,
>
> Congratulations !!
> Good job
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI Intents

2018-04-17 Thread nino martinez wael
yes I know that :) Am already using it..

I've cloned the repo to prepare for the PR.. But are in doubt on howto make
the  ip multi binding detection work here :
https://github.com/TDC-Netdesign/cxf-dosgi/blob/master/provider-rs/src/main/java/org/apache/cxf/dosgi/rest/intents/SwaggerIntent.java#L62

If we do not handle it, IP will be 0.0.0.0 and all swagger executions will
fail. It has to be a real IP or host name.

Can you take a look and give feedback.. I've just "dumped" the intents into
the rest provider, as they both are rest specific.. I am also testing to
see if I can avoid pulling in hibernate for bean validation (and let it be
up to the user to choose), there is a hard binding for jackson though..

regards Nino



On Tue, Apr 17, 2018 at 10:43 AM, Christian Schneider <
ch...@die-schneider.net> wrote:

> You can check the new logging feature for an example how it registers
> itself using a featue.
> Btw. The logging intent is registered by default already.
> See:
> https://github.com/apache/cxf/blob/master/rt/features/
> logging/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java#L89
>
> Christian
>
> 2018-04-17 10:35 GMT+02:00 nino martinez wael <
> nino.martinez.w...@gmail.com>
> :
>
> > Ahh I did not think of that... I'll verify if its viable..
> >
> > On Tue, Apr 17, 2018 at 10:07 AM, Christian Schneider <
> > ch...@die-schneider.net> wrote:
> >
> > > If your intent is a cxf Feature then you can access the endpoint data
> > > during your setup.
> > >
> > > Best
> > > Christian
> > >
> > > 2018-04-17 10:03 GMT+02:00 nino martinez wael <
> > > nino.martinez.w...@gmail.com>
> > > :
> > >
> > > > Are there no way for an intent to get in contact with the service /
> > > > endpoint it's being asked to setup?
> > > >
> > > > --
> > > > Best regards / Med venlig hilsen
> > > > Nino Martinez
> > > >
> > >
> > >
> > >
> > > --
> > > --
> > > Christian Schneider
> > > http://www.liquid-reality.de
> > >
> > > Computer Scientist
> > > http://www.adobe.com
> > >
> >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI Intents

2018-04-17 Thread nino martinez wael
Ahh I did not think of that... I'll verify if its viable..

On Tue, Apr 17, 2018 at 10:07 AM, Christian Schneider <
ch...@die-schneider.net> wrote:

> If your intent is a cxf Feature then you can access the endpoint data
> during your setup.
>
> Best
> Christian
>
> 2018-04-17 10:03 GMT+02:00 nino martinez wael <
> nino.martinez.w...@gmail.com>
> :
>
> > Are there no way for an intent to get in contact with the service /
> > endpoint it's being asked to setup?
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI Intents

2018-04-17 Thread nino martinez wael
Are there no way for an intent to get in contact with the service /
endpoint it's being asked to setup?

-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI default intents?

2018-04-17 Thread nino martinez wael
Hi

Im wondering why there are no default intents shipped with DOSGI. I find my
self doing the same thing for multiple projects, like creating an jackson
intent that also adds validation

https://paste.apache.org/fUQu

And the swagger intent:

https://paste.apache.org/I7aJ

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: cxf + swagger (DOSGI 2.2.0 + cxf 3.2.1)

2018-03-02 Thread nino martinez wael
clean karaf 4.2 m2 with only CXF 3.2.3-SNAPSHOT

D:\apache-karaf-4.2.0.M2\bin>karaf
__ __  
   / //_/ __ _/ __/
  / ,<  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/

  Apache Karaf (4.2.0.M2)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.

karaf@root()> feature:repo-add cxf 3.2.3-SNAPSHOT
Adding feature url
mvn:org.apache.cxf.karaf/apache-cxf/3.2.3-SNAPSHOT/xml/features
karaf@root()> feature:install cxf-rs-description-swagger2
karaf@root()> feature:install aries-blueprint
karaf@root()> install -s
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT
Bundle ID: 127
Error executing command: Error installing bundles:
Unable to start bundle
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT:
org.osgi.framework.BundleException: Uses c
nstraint violation. Unable to resolve resource
org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swa
ger2_osgi [127](R 127.0)] because it is exposed to package
'javax.annotation' from resources javax.annotation-api
[javax.annotation-api [54](R 54.0)]
and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via
two dependency chains.

Chain 1:
  org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [127](R 127.0)]
import:
(&(osgi.wiring.package=javax.annotation)(version>=1.2.0)(!(version>=2.0.0)))
 |
export: osgi.wiring.package: javax.annotation
  javax.annotation-api [javax.annotation-api [54](R 54.0)]

Chain 2:
  org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [127](R 127.0)]
import:
(&(osgi.wiring.package=io.swagger.jaxrs.config)(version>=1.5.0)(!(version>=2.0.0)))
 |
export: osgi.wiring.package=io.swagger.jaxrs.config;
uses:=org.reflections.util
  io.swagger.jaxrs [io.swagger.jaxrs [51](R 51.0)]
import:
(&(osgi.wiring.package=org.reflections.util)(version>=0.9.0)(!(version>=1.0.0)))
 |
export: osgi.wiring.package=org.reflections.util; uses:=javax.annotation
  org.apache.servicemix.bundles.reflections
[org.apache.servicemix.bundles.reflections [81](R 81.0)]
import: (osgi.wiring.package=javax.annotation)
 |
export: osgi.wiring.package: javax.annotation
  org.apache.felix.framework [org.apache.felix.framework [0](R 0)]
Unresolved requirements:
[[org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[127](R 127.0)] osgi.wiring.package;
(&(osgi.wiring.package=io.swagger.jaxrs.config)(version>=1.5.0)(!(version>=2.0.0)))]
karaf@root()>



























On Fri, Mar 2, 2018 at 12:04 PM, Jean-Baptiste Onofré <j...@nanthrax.net>
wrote:

> Karaf features namespace 1.4 is supported by Karaf 4.x, not 3.x.
>
> Regards
> JB
>
> On 03/02/2018 12:02 PM, nino martinez wael wrote:
> > on a clean 3.0.8:
> >
> > Microsoft Windows [Version 6.1.7601]
> > Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> >
> > D:\apache-karaf-3.0.8\bin>karaf
> > __ __  
> >/ //_/ __ _/ __/
> >   / ,<  / __ `/ ___/ __ `/ /_
> >  / /| |/ /_/ / /  / /_/ / __/
> > /_/ |_|\__,_/_/   \__,_/_/
> >
> >   Apache Karaf (3.0.8)
> >
> > Hit '' for a list of available commands
> > and '[cmd] --help' for help on a specific command.
> > Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.
> >
> > karaf@root()> feature:install cxf-rs-description-swagger2
> > Error executing command: Unrecognized root element: {
> > http://karaf.apache.org/xmlns/features/v1.4.0}features
> > karaf@root()>
> >
> >
> > I will also get a clean karaf 4.2.0 m2
> >
> > On Fri, Mar 2, 2018 at 11:44 AM, Jean-Baptiste Onofré <j...@nanthrax.net>
> > wrote:
> >
> >> It seems you are mixing swagger 1 and 2 features, can you try a refresh
> or
> >> from
> >> a clean install ?
> >>
> >> Regards
> >> JB
> >>
> >> On 03/02/2018 11:40 AM, nino martinez wael wrote:
> >>> I get this:
> >>>
> >>> karaf@root()> feature:install aries-blueprint
> >>> karaf@root()> install -s
> >>> mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> >> osgi/3.2.3-SNAPSHOT
> >>> Bundle ID: 116
> >>> Error executing command: Error installing bundles:
> >>> Unable to start bundle
> >>> mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
&g

Re: cxf + swagger (DOSGI 2.2.0 + cxf 3.2.1)

2018-03-02 Thread nino martinez wael
on a clean 3.0.8:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

D:\apache-karaf-3.0.8\bin>karaf
__ __  
   / //_/ __ _/ __/
  / ,<  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/

  Apache Karaf (3.0.8)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'system:shutdown' or 'logout' to shutdown Karaf.

karaf@root()> feature:install cxf-rs-description-swagger2
Error executing command: Unrecognized root element: {
http://karaf.apache.org/xmlns/features/v1.4.0}features
karaf@root()>


I will also get a clean karaf 4.2.0 m2

On Fri, Mar 2, 2018 at 11:44 AM, Jean-Baptiste Onofré <j...@nanthrax.net>
wrote:

> It seems you are mixing swagger 1 and 2 features, can you try a refresh or
> from
> a clean install ?
>
> Regards
> JB
>
> On 03/02/2018 11:40 AM, nino martinez wael wrote:
> > I get this:
> >
> > karaf@root()> feature:install aries-blueprint
> > karaf@root()> install -s
> > mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> osgi/3.2.3-SNAPSHOT
> > Bundle ID: 116
> > Error executing command: Error installing bundles:
> > Unable to start bundle
> > mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> osgi/3.2.3-SNAPSHOT:
> > org.osgi.framework.BundleException: Uses co
> > nstraint violation. Unable to resolve resource
> > org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> > [org.apache.cxf.samples.jax_rs_description_swag
> > ger2_osgi [116](R 116.0)] because it is exposed to package
> > 'javax.annotation' from resources javax.annotation-api
> > [javax.annotation-api [54](R 54.0)]
> > and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via
> > two dependency chains.
> >
> > Chain 1:
> >   org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> > [org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R 116.0)]
> > import:
> > (&(osgi.wiring.package=javax.annotation)(version>=1.2.0)(!(
> version>=2.0.0)))
> >  |
> > export: osgi.wiring.package: javax.annotation
> >   javax.annotation-api [javax.annotation-api [54](R 54.0)]
> >
> > Chain 2:
> >   org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> > [org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R 116.0)]
> > import:
> > (&(osgi.wiring.package=io.swagger.jaxrs.config)(version>
> =1.5.0)(!(version>=2.0.0)))
> >  |
> > export: osgi.wiring.package=io.swagger.jaxrs.config;
> > uses:=org.reflections.util
> >   io.swagger.jaxrs [io.swagger.jaxrs [51](R 51.0)]
> > import:
> > (&(osgi.wiring.package=org.reflections.util)(version>=0.
> 9.0)(!(version>=1.0.0)))
> >  |
> > export: osgi.wiring.package=org.reflections.util;
> uses:=javax.annotation
> >   org.apache.servicemix.bundles.reflections
> > [org.apache.servicemix.bundles.reflections [155](R 155.0)]
> > import: (osgi.wiring.package=javax.annotation)
> >  |
> > export: osgi.wiring.package: javax.annotation
> >   org.apache.felix.framework [org.apache.felix.framework [0](R 0)]
> > Unresolved requirements:
> > [[org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> > [116](R 116.0)] osgi.wiring.package;
> > (&(osgi.wiring.package=io.swagger.jaxrs.config)(version>
> =1.5.0)(!(version>=2.0.0)))]
> > karaf@root()>
> >
> >
> > Will try a karaf 3.0.x
> >
> > On Fri, Mar 2, 2018 at 8:57 AM, Jean-Baptiste Onofré <j...@nanthrax.net>
> > wrote:
> >
> >> Hi Nino,
> >>
> >> you have to install aries-blueprint feature.
> >>
> >> Actually, CXF feature repo should define this in order to have a smooth
> >> installation.
> >>
> >> I also proposed to install jackson bundles with cxfrs. I will prepare a
> PR
> >> about
> >> that.
> >>
> >> Regards
> >> JB
> >>
> >> On 03/02/2018 07:43 AM, nino martinez wael wrote:
> >>> Okay using latest karaf 4.2 m2 I get this:
> >>>
> >>> karaf@root()> feature:install cxf
> >>> Error executing command: No matching features for cxf/0
> >>> karaf@root()> feature:repo-add cxf 3.2.2
> >>> Adding feature url mvn:org.apache.cxf.karaf/
> >> apache-cxf/3.2.2/xml/features
> >>> karaf@root()> feature:install cxf-rs-description-swagger2
> >>> ka

Re: cxf + swagger (DOSGI 2.2.0 + cxf 3.2.1)

2018-03-02 Thread nino martinez wael
I get this:

karaf@root()> feature:install aries-blueprint
karaf@root()> install -s
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT
Bundle ID: 116
Error executing command: Error installing bundles:
Unable to start bundle
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT:
org.osgi.framework.BundleException: Uses co
nstraint violation. Unable to resolve resource
org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swag
ger2_osgi [116](R 116.0)] because it is exposed to package
'javax.annotation' from resources javax.annotation-api
[javax.annotation-api [54](R 54.0)]
and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via
two dependency chains.

Chain 1:
  org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R 116.0)]
import:
(&(osgi.wiring.package=javax.annotation)(version>=1.2.0)(!(version>=2.0.0)))
 |
export: osgi.wiring.package: javax.annotation
  javax.annotation-api [javax.annotation-api [54](R 54.0)]

Chain 2:
  org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R 116.0)]
import:
(&(osgi.wiring.package=io.swagger.jaxrs.config)(version>=1.5.0)(!(version>=2.0.0)))
 |
export: osgi.wiring.package=io.swagger.jaxrs.config;
uses:=org.reflections.util
  io.swagger.jaxrs [io.swagger.jaxrs [51](R 51.0)]
import:
(&(osgi.wiring.package=org.reflections.util)(version>=0.9.0)(!(version>=1.0.0)))
 |
export: osgi.wiring.package=org.reflections.util; uses:=javax.annotation
  org.apache.servicemix.bundles.reflections
[org.apache.servicemix.bundles.reflections [155](R 155.0)]
import: (osgi.wiring.package=javax.annotation)
 |
export: osgi.wiring.package: javax.annotation
  org.apache.felix.framework [org.apache.felix.framework [0](R 0)]
Unresolved requirements:
[[org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[116](R 116.0)] osgi.wiring.package;
(&(osgi.wiring.package=io.swagger.jaxrs.config)(version>=1.5.0)(!(version>=2.0.0)))]
karaf@root()>


Will try a karaf 3.0.x

On Fri, Mar 2, 2018 at 8:57 AM, Jean-Baptiste Onofré <j...@nanthrax.net>
wrote:

> Hi Nino,
>
> you have to install aries-blueprint feature.
>
> Actually, CXF feature repo should define this in order to have a smooth
> installation.
>
> I also proposed to install jackson bundles with cxfrs. I will prepare a PR
> about
> that.
>
> Regards
> JB
>
> On 03/02/2018 07:43 AM, nino martinez wael wrote:
> > Okay using latest karaf 4.2 m2 I get this:
> >
> > karaf@root()> feature:install cxf
> > Error executing command: No matching features for cxf/0
> > karaf@root()> feature:repo-add cxf 3.2.2
> > Adding feature url mvn:org.apache.cxf.karaf/
> apache-cxf/3.2.2/xml/features
> > karaf@root()> feature:install cxf-rs-description-swagger2
> > karaf@root()> install -s
> > mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> osgi/3.2.3-SNAPSHOT
> > Bundle ID: 116
> > Error executing command: Error installing bundles:
> > Unable to start bundle
> > mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> osgi/3.2.3-SNAPSHOT:
> > org.osgi.framework.BundleException: Unable
> > to resolve org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> [116](R
> > 116.0): missing requirement [org.apache.cxf.samples.jax_
> rs_description_swag
> > ger2_osgi [116](R 116.0)] osgi.wiring.package;
> > (&(osgi.wiring.package=org.osgi.service.blueprint)(
> version>=1.0.0)(!(version>=2.0.0)))
> > Unresolved requi
> > rements: [[org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> [116](R
> > 116.0)] osgi.wiring.package; (&(osgi.wiring.package=org.
> osgi.service.bluepr
> > int)(version>=1.0.0)(!(version>=2.0.0)))]
> > karaf@root()> feature:install scr
> > karaf@root()> install -s
> > mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> osgi/3.2.3-SNAPSHOT
> > Bundle ID: 116
> > Error executing command: Error installing bundles:
> > Unable to start bundle
> > mvn:org.apache.cxf.samples/jax_rs_description_swagger2_
> osgi/3.2.3-SNAPSHOT:
> > org.osgi.framework.BundleException: Unable
> > to resolve org.apache.cxf.samples.jax_rs_description_swagger2_osgi
> [116](R
> > 116.0): missing requirement [org.apache.cxf.samples.jax_
> rs_description_swag
> > ger2_osgi [116](R 116.0)] osgi.wiring.package;
> > (&(osgi.wiring.package=org.osgi.service.blueprint)(
> version>=1.0.0)(!(version>=2.0.0)))
> > Unresolved requi
> > rements: [[org.apache.cxf.samples.

Re: cxf + swagger (DOSGI 2.2.0 + cxf 3.2.1)

2018-03-01 Thread nino martinez wael
Okay using latest karaf 4.2 m2 I get this:

karaf@root()> feature:install cxf
Error executing command: No matching features for cxf/0
karaf@root()> feature:repo-add cxf 3.2.2
Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.2.2/xml/features
karaf@root()> feature:install cxf-rs-description-swagger2
karaf@root()> install -s
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT
Bundle ID: 116
Error executing command: Error installing bundles:
Unable to start bundle
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT:
org.osgi.framework.BundleException: Unable
to resolve org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R
116.0): missing requirement [org.apache.cxf.samples.jax_rs_description_swag
ger2_osgi [116](R 116.0)] osgi.wiring.package;
(&(osgi.wiring.package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
Unresolved requi
rements: [[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R
116.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.bluepr
int)(version>=1.0.0)(!(version>=2.0.0)))]
karaf@root()> feature:install scr
karaf@root()> install -s
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT
Bundle ID: 116
Error executing command: Error installing bundles:
Unable to start bundle
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT:
org.osgi.framework.BundleException: Unable
to resolve org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R
116.0): missing requirement [org.apache.cxf.samples.jax_rs_description_swag
ger2_osgi [116](R 116.0)] osgi.wiring.package;
(&(osgi.wiring.package=org.osgi.service.blueprint)(version>=1.0.0)(!(version>=2.0.0)))
Unresolved requi
rements: [[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R
116.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.bluepr
int)(version>=1.0.0)(!(version>=2.0.0)))]
karaf@root()> feature:install blueprint-web
karaf@root()> install -s
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT
Bundle ID: 116
Error executing command: Error installing bundles:
Unable to start bundle
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT:
org.osgi.framework.BundleException: Uses co
nstraint violation. Unable to resolve resource
org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swag
ger2_osgi [116](R 116.0)] because it is exposed to package
'javax.annotation' from resources javax.annotation-api
[javax.annotation-api [54](R 54.0)]
and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via
two dependency chains.

Chain 1:
  org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R 116.0)]
import:
(&(osgi.wiring.package=javax.annotation)(version>=1.2.0)(!(version>=2.0.0)))
 |
export: osgi.wiring.package: javax.annotation
  javax.annotation-api [javax.annotation-api [54](R 54.0)]

Chain 2:
  org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[org.apache.cxf.samples.jax_rs_description_swagger2_osgi [116](R 116.0)]
import:
(&(osgi.wiring.package=io.swagger.jaxrs.config)(version>=1.5.0)(!(version>=2.0.0)))
 |
export: osgi.wiring.package=io.swagger.jaxrs.config;
uses:=org.reflections.util
  io.swagger.jaxrs [io.swagger.jaxrs [51](R 51.0)]
import:
(&(osgi.wiring.package=org.reflections.util)(version>=0.9.0)(!(version>=1.0.0)))
 |
export: osgi.wiring.package=org.reflections.util; uses:=javax.annotation
  org.apache.servicemix.bundles.reflections
[org.apache.servicemix.bundles.reflections [81](R 81.0)]
import: (osgi.wiring.package=javax.annotation)
 |
export: osgi.wiring.package: javax.annotation
  org.apache.felix.framework [org.apache.felix.framework [0](R 0)]
Unresolved requirements:
[[org.apache.cxf.samples.jax_rs_description_swagger2_osgi
[116](R 116.0)] osgi.wiring.package;
(&(osgi.wiring.package=io.swagger.jaxrs.config)(version>=1.5.0)(!(version>=2.0.0)))]
karaf@root()> feature:install webconsole
karaf@root()> install -s
mvn:org.apache.cxf.samples/jax_rs_description_swagger2_osgi/3.2.3-SNAPSHOT


I will try with the mentioned 3.x karaf in the samples and return with
status..

On Fri, Feb 23, 2018 at 9:06 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> I havent tried it with the "official" examples..
>
> I'll give it a go.
>
> On Wed, Feb 21, 2018 at 10:46 AM, Colm O hEigeartaigh <cohei...@apache.org
> > wrote:
>
>> Do you have exact steps to reproduce the problem?
>>
>> Colm.
>>
>> On Wed, Feb 21, 2018 at 6:06 AM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> > Hi I am using cxf

Re: cxf + swagger (DOSGI 2.2.0 + cxf 3.2.1)

2018-02-23 Thread nino martinez wael
I havent tried it with the "official" examples..

I'll give it a go.

On Wed, Feb 21, 2018 at 10:46 AM, Colm O hEigeartaigh <cohei...@apache.org>
wrote:

> Do you have exact steps to reproduce the problem?
>
> Colm.
>
> On Wed, Feb 21, 2018 at 6:06 AM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
> > Hi I am using cxf plus the swagger intent.. And it is working in the
> sense
> > that the swager documents gets published.
> >
> > I noticed once and only once that on the CXF "overview" page where you
> > normally can see the different endpoints that are registered there were
> > also a link to the swagger documentation..
> >
> > What's up with that, I wonder why it's not there consistently?
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


cxf + swagger (DOSGI 2.2.0 + cxf 3.2.1)

2018-02-20 Thread nino martinez wael
Hi I am using cxf plus the swagger intent.. And it is working in the sense
that the swager documents gets published.

I noticed once and only once that on the CXF "overview" page where you
normally can see the different endpoints that are registered there were
also a link to the swagger documentation..

What's up with that, I wonder why it's not there consistently?

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.2.1 swagger generation are wrong for json

2017-12-06 Thread nino martinez wael
Yes I think so.. Although I have no proof it works on non osgi systems..

On Wed, 6 Dec 2017, 12:35 Sergey Beryozkin, <sberyoz...@gmail.com> wrote:

> Hi Nino
>
> So it is a pure OSGI issue now, right ?
> Lets ask Christian as well, Christian, can you advise how to overcome
> this annotations issue ?
>
> Cheers, Sergey
> On 06/12/17 11:30, nino martinez wael wrote:
> > No change after getting the javax.xml.bind.annotation.. I can see I can
> > change how some of the interpretations are done when adding jackson
> > specific json annotations.. But it's still not correct. :(
> >
> > On Wed, Dec 6, 2017 at 7:07 AM, nino martinez wael
> > <nino.martinez.w...@gmail.com <mailto:nino.martinez.w...@gmail.com>>
> wrote:
> >
> > Okay after adding swagger annotations as an export from my bundle.
> > The swagger json are now including whatever I describe in the
> > annotations. However the maven bundle plugin keeps removing my
> > export for javax.xml.bind.annotation and so I cannot test if this
> > also have an impact on swagger ignoring my javax.xml.bind.annotation
> > configurations, however it does seem logical.. Digging further.
> >
> >
> > regards Nino
> >
> > On Tue, Dec 5, 2017 at 8:07 AM, nino martinez wael
> > <nino.martinez.w...@gmail.com <mailto:nino.martinez.w...@gmail.com>>
> > wrote:
> >
> > I've started testing that idea, and it seems to have an impact..
> > I will return once I know more!!
> >
> > Thanks!
> >
> > On Mon, Dec 4, 2017 at 5:08 PM, Sergey Beryozkin
> > <sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>> wrote:
> >
> > CXF Swagger feature itself is not importing Swagger
> >     annotations because it does not work with them, I'm not
> > sure, may be you need to have your application bundle
> > exporting the annotations to make the visible...
> >
> > Sergey
> > On 04/12/17 15:06, nino martinez wael wrote:
> >
> > No, no namespaces
> >
> > And I am still pussled on why it does not do it the
> > "right" way.. Currently I am experimenting putting in
> > io.swagger.annotations BUT they seem to have no effect
> > on the generated swagger describtion when placed in our
> > backend models, they are in another bundle, im wondering
> > if the swagger feature somehow are not able to read the
> > annotations across the bundles, that would very much
> > explain why its not working..?
> >
> > On Mon, Dec 4, 2017 at 11:46 AM, Sergey Beryozkin
> > <sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>
> >     <mailto:sberyoz...@gmail.com
> > <mailto:sberyoz...@gmail.com>>> wrote:
> >
> >  Nice,
> >  Just out of curiosity, what does Swagger set the
> > XML Object's
> >  namespace to ? Is it initialized ?
> >
> >  Sergey
> >
> >  On 04/12/17 06:03, nino martinez wael wrote:
> >
> >  Okay so I've looked into this a bit. And turned
> > the problem
> >  upside down. Instead of trying to make the cxf
> > swagger feature
> >  use jackson, just taking a look at the outcome
> > and play around
> >  trying to change it.. Again if there is any way
> > to see what the
> >  swagger feature plugin are using runtime to
> > process file with,
> >  it would very helpfull..
> >
> >  It seems that the swagger feature are partially
> > ignoring my
> >  annotations, so picking up @xmlrootelement but
> > partially
> >  ignoring the list annotations..
> >
> >  @XmlAccessorType(XmlAccessType.FIELD)
> >  @XmlRootElement(name = "contacts")
> >  public class MinimalContactWrapper {
&

Re: CXF 3.2.1 swagger generation are wrong for json

2017-12-05 Thread nino martinez wael
Okay after adding swagger annotations as an export from my bundle. The
swagger json are now including whatever I describe in the annotations.
However the maven bundle plugin keeps removing my export for
javax.xml.bind.annotation
and so I cannot test if this also have an impact on swagger ignoring
my javax.xml.bind.annotation
configurations, however it does seem logical.. Digging further.


regards Nino

On Tue, Dec 5, 2017 at 8:07 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> I've started testing that idea, and it seems to have an impact.. I will
> return once I know more!!
>
> Thanks!
>
> On Mon, Dec 4, 2017 at 5:08 PM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> CXF Swagger feature itself is not importing Swagger annotations because
>> it does not work with them, I'm not sure, may be you need to have your
>> application bundle exporting the annotations to make the visible...
>>
>> Sergey
>> On 04/12/17 15:06, nino martinez wael wrote:
>>
>>> No, no namespaces
>>>
>>> And I am still pussled on why it does not do it the "right" way..
>>> Currently I am experimenting putting in io.swagger.annotations BUT they
>>> seem to have no effect on the generated swagger describtion when placed in
>>> our backend models, they are in another bundle, im wondering if the swagger
>>> feature somehow are not able to read the annotations across the bundles,
>>> that would very much explain why its not working..?
>>>
>>> On Mon, Dec 4, 2017 at 11:46 AM, Sergey Beryozkin <sberyoz...@gmail.com
>>> <mailto:sberyoz...@gmail.com>> wrote:
>>>
>>> Nice,
>>> Just out of curiosity, what does Swagger set the XML Object's
>>> namespace to ? Is it initialized ?
>>>
>>> Sergey
>>>
>>> On 04/12/17 06:03, nino martinez wael wrote:
>>>
>>> Okay so I've looked into this a bit. And turned the problem
>>> upside down. Instead of trying to make the cxf swagger feature
>>> use jackson, just taking a look at the outcome and play around
>>> trying to change it.. Again if there is any way to see what the
>>> swagger feature plugin are using runtime to process file with,
>>> it would very helpfull..
>>>
>>> It seems that the swagger feature are partially ignoring my
>>> annotations, so picking up @xmlrootelement but partially
>>> ignoring the list annotations..
>>>
>>> @XmlAccessorType(XmlAccessType.FIELD)
>>> @XmlRootElement(name = "contacts")
>>> public class MinimalContactWrapper {
>>>
>>>   @XmlElementWrapper(name = "wrap")
>>>   @XmlElement(name = "minimalcontact")
>>>   private List contactList;
>>>
>>>   public List getMinimalContacts() {
>>>   return contactList;
>>>   }
>>>
>>>   public void setMinimalContacts(List
>>> minimalContacts) {
>>>   this.contactList = minimalContacts;
>>>   }
>>>
>>> }
>>>
>>>
>>> to
>>>
>>> @XmlAccessorType(XmlAccessType.FIELD)
>>> @XmlRootElement(name ="contacts")
>>> public class MinimalContactWrapper {
>>>
>>>   @XmlElementRef(name ="minimalContact")
>>>   @Valid
>>> @NotNull
>>> @Size(min =1)
>>>   private ListminimalContacts=new
>>> ArrayList<>();
>>>
>>>   public List getMinimalContacts() {
>>>   return minimalContacts;
>>>   }
>>>
>>>   public void setMinimalContacts(List
>>> minimalContacts) {
>>>   this.minimalContacts = minimalContacts;
>>>   }
>>>
>>> }
>>>
>>> Made the xml results required equal in the swagger feature to
>>> what CXF and enunciate feels it should be... Namely this:
>>>
>>> ...>> t>..>> accountNumber>...>> icationNumber1>...>> 1>..>> icationNumber2>...>> 2>.>> address>.
>>> ..<
>>> campaignId>...
>>>
>&g

Re: CXF 3.2.1 swagger generation are wrong for json

2017-12-04 Thread nino martinez wael
I've started testing that idea, and it seems to have an impact.. I will
return once I know more!!

Thanks!

On Mon, Dec 4, 2017 at 5:08 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> CXF Swagger feature itself is not importing Swagger annotations because it
> does not work with them, I'm not sure, may be you need to have your
> application bundle exporting the annotations to make the visible...
>
> Sergey
> On 04/12/17 15:06, nino martinez wael wrote:
>
>> No, no namespaces
>>
>> And I am still pussled on why it does not do it the "right" way..
>> Currently I am experimenting putting in io.swagger.annotations BUT they
>> seem to have no effect on the generated swagger describtion when placed in
>> our backend models, they are in another bundle, im wondering if the swagger
>> feature somehow are not able to read the annotations across the bundles,
>> that would very much explain why its not working..?
>>
>> On Mon, Dec 4, 2017 at 11:46 AM, Sergey Beryozkin <sberyoz...@gmail.com
>> <mailto:sberyoz...@gmail.com>> wrote:
>>
>> Nice,
>> Just out of curiosity, what does Swagger set the XML Object's
>> namespace to ? Is it initialized ?
>>
>> Sergey
>>
>> On 04/12/17 06:03, nino martinez wael wrote:
>>
>> Okay so I've looked into this a bit. And turned the problem
>> upside down. Instead of trying to make the cxf swagger feature
>> use jackson, just taking a look at the outcome and play around
>> trying to change it.. Again if there is any way to see what the
>> swagger feature plugin are using runtime to process file with,
>> it would very helpfull..
>>
>> It seems that the swagger feature are partially ignoring my
>> annotations, so picking up @xmlrootelement but partially
>> ignoring the list annotations..
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlRootElement(name = "contacts")
>> public class MinimalContactWrapper {
>>
>>   @XmlElementWrapper(name = "wrap")
>>   @XmlElement(name = "minimalcontact")
>>   private List contactList;
>>
>>   public List getMinimalContacts() {
>>   return contactList;
>>   }
>>
>>   public void setMinimalContacts(List
>> minimalContacts) {
>>   this.contactList = minimalContacts;
>>   }
>>
>> }
>>
>>
>> to
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlRootElement(name ="contacts")
>> public class MinimalContactWrapper {
>>
>>   @XmlElementRef(name ="minimalContact")
>>   @Valid
>> @NotNull
>> @Size(min =1)
>>   private ListminimalContacts=new
>> ArrayList<>();
>>
>>   public List getMinimalContacts() {
>>   return minimalContacts;
>>   }
>>
>>   public void setMinimalContacts(List
>> minimalContacts) {
>>   this.minimalContacts = minimalContacts;
>>   }
>>
>> }
>>
>> Made the xml results required equal in the swagger feature to
>> what CXF and enunciate feels it should be... Namely this:
>>
>> ...> t>..
>> ...> ificationNumber1>...<
>> firstName1>..> alIdentificationNumber2>...<
>> firstName2>..> s>.> hone>.> id>...
>>
>>
>> Instead of something like this:
>>
>> 
>> 
>> 
>> 
>> string
>> 0
>> string
>> string
>> string
>>     0
>> string> nNumber1>
>> string
>> string
>> string> nNumber2>
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> 
>> 
>> 
>>
>>
>>
>>
>> On Thu, Nov 30, 2017 at 1:43 PM, nino martinez wael
>> <nino.martinez.w...@gmail.com
>> <mailto:nino.martinez.w...@gmail.com>
>> <mailto:nino.martinez.w...@gmail.com
>> <

Re: CXF 3.2.1 swagger generation are wrong for json

2017-12-04 Thread nino martinez wael
No, no namespaces

And I am still pussled on why it does not do it the "right" way.. Currently
I am experimenting putting in io.swagger.annotations BUT they seem to have
no effect on the generated swagger describtion when placed in our backend
models, they are in another bundle, im wondering if the swagger feature
somehow are not able to read the annotations across the bundles, that would
very much explain why its not working..?

On Mon, Dec 4, 2017 at 11:46 AM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Nice,
> Just out of curiosity, what does Swagger set the XML Object's namespace to
> ? Is it initialized ?
>
> Sergey
>
> On 04/12/17 06:03, nino martinez wael wrote:
>
>> Okay so I've looked into this a bit. And turned the problem upside down.
>> Instead of trying to make the cxf swagger feature use jackson, just taking
>> a look at the outcome and play around trying to change it.. Again if there
>> is any way to see what the swagger feature plugin are using runtime to
>> process file with, it would very helpfull..
>>
>> It seems that the swagger feature are partially ignoring my annotations,
>> so picking up @xmlrootelement but partially ignoring the list annotations..
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlRootElement(name = "contacts")
>> public class MinimalContactWrapper {
>>
>>  @XmlElementWrapper(name = "wrap")
>>  @XmlElement(name = "minimalcontact")
>>  private List contactList;
>>
>>  public List getMinimalContacts() {
>>  return contactList;
>>  }
>>
>>  public void setMinimalContacts(List
>> minimalContacts) {
>>  this.contactList = minimalContacts;
>>  }
>>
>> }
>>
>>
>> to
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlRootElement(name ="contacts")
>> public class MinimalContactWrapper {
>>
>>  @XmlElementRef(name ="minimalContact")
>>  @Valid
>> @NotNull
>> @Size(min =1)
>>  private ListminimalContacts=new ArrayList<>();
>>
>>  public List getMinimalContacts() {
>>  return minimalContacts;
>>  }
>>
>>  public void setMinimalContacts(List
>> minimalContacts) {
>>  this.minimalContacts = minimalContacts;
>>  }
>>
>> }
>>
>> Made the xml results required equal in the swagger feature to what CXF
>> and enunciate feels it should be... Namely this:
>>
>> ...> t>......
>> ...> ificationNumber1>...<
>> firstName1>..> alIdentificationNumber2>...<
>> firstName2>..> s>.> hone>.> id>...
>>
>>
>> Instead of something like this:
>>
>> 
>> 
>> 
>> 
>> string
>> 0
>> string
>> string
>> string
>> 0
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> string
>> 
>> 
>> 
>>
>>
>>
>>
>> On Thu, Nov 30, 2017 at 1:43 PM, nino martinez wael <
>> nino.martinez.w...@gmail.com <mailto:nino.martinez.w...@gmail.com>>
>> wrote:
>>
>> No change without setting swagger2customizer..
>>
>> I'll let it rest for a day..
>>
>> On Thu, Nov 30, 2017 at 1:30 PM, nino martinez wael
>> <nino.martinez.w...@gmail.com <mailto:nino.martinez.w...@gmail.com>>
>> wrote:
>>
>> yup have set skip.default.json.provider.re
>> <http://skip.default.json.provider.re>gistration..
>>
>> But no matter what I do it has no effect on what the swagger
>> feature generates.. Where it's changing the json provider or
>> removing it all together..
>>
>> Trying it now without setting swagger2Customizer..
>>
>>
>> On Thu, Nov 30, 2017 at 1:04 PM, Sergey Beryozkin
>> <sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>> wrote:
>>
>> Just FYI, removing Jettison lib will ensure it's not
>> auto-installed by CXF, and if it is not possible to remove
>> then the other option is to set
>> a "skip.default.json.provider.re
>> <http://skip.default.json.provider.re>gistration" bus
>> property.
>>
>> However it's not related to Swagger at all, Jettison if
>> installed 

Re: CXF 3.2.1 swagger generation are wrong for json

2017-12-03 Thread nino martinez wael
Okay so I've looked into this a bit. And turned the problem upside down.
Instead of trying to make the cxf swagger feature use jackson, just taking
a look at the outcome and play around trying to change it.. Again if there
is any way to see what the swagger feature plugin are using runtime to
process file with, it would very helpfull..

It seems that the swagger feature are partially ignoring my annotations, so
picking up @xmlrootelement but partially ignoring the list annotations..

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "contacts")
public class MinimalContactWrapper {

@XmlElementWrapper(name = "wrap")
@XmlElement(name = "minimalcontact")
private List contactList;

public List getMinimalContacts() {
return contactList;
}

public void setMinimalContacts(List minimalContacts) {
this.contactList = minimalContacts;
}

}


to

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "contacts")
public class MinimalContactWrapper {

@XmlElementRef(name = "minimalContact")
@Valid
@NotNull
@Size(min = 1)
private List minimalContacts=new ArrayList<>();

public List getMinimalContacts() {
return minimalContacts;
}

public void setMinimalContacts(List minimalContacts) {
this.minimalContacts = minimalContacts;
}

}

Made the xml results required equal in the swagger feature to what CXF and
enunciate feels it should be... Namely this:


  
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
  


Instead of something like this:





string
0
string
string
string
0
string
string
string
string
string
string
string
string
string
string
string
string







On Thu, Nov 30, 2017 at 1:43 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> No change without setting swagger2customizer..
>
> I'll let it rest for a day..
>
> On Thu, Nov 30, 2017 at 1:30 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> yup have set skip.default.json.provider.registration..
>>
>> But no matter what I do it has no effect on what the swagger feature
>> generates.. Where it's changing the json provider or removing it all
>> together..
>>
>> Trying it now without setting swagger2Customizer..
>>
>>
>> On Thu, Nov 30, 2017 at 1:04 PM, Sergey Beryozkin <sberyoz...@gmail.com>
>> wrote:
>>
>>> Just FYI, removing Jettison lib will ensure it's not auto-installed by
>>> CXF, and if it is not possible to remove then the other option is to set
>>> a "skip.default.json.provider.registration" bus property.
>>>
>>> However it's not related to Swagger at all, Jettison if installed will
>>> only affect the way JSON is generated for service responses
>>>
>>> Sergey
>>>
>>> On 30/11/17 11:57, nino martinez wael wrote:
>>>
>>>> It does not seem to be a jettison problem.. And neither an problem with
>>>> jackson versions, I just wiped all jettison and jackson(except 2.9.1 )
>>>> versions from my running environment..
>>>>
>>>> Looking into of it could be something with JacksonJaxbJsonProvider vs
>>>> JacksonJsonProvider
>>>>
>>>> On Thu, Nov 30, 2017 at 12:45 PM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> IS there somewhere while on runtime where I can print current registered
>>>>> providers for cxf, I have a feeling that it somehow are using jettison
>>>>> for
>>>>> json...
>>>>>
>>>>> On Thu, Nov 30, 2017 at 12:17 PM, nino martinez wael <
>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>
>>>>> Okay I will check into libraries whats on class path.. I have the same
>>>>>> gut feeling that it could be something like that.
>>>>>>
>>>>>> I have enunciate up and working on the side..
>>>>>>
>>>>>> On Thu, Nov 30, 2017 at 11:18 AM, Sergey Beryozkin <
>>>>>> sberyoz...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> Yes, the minor Swagger version caused this change, what was working
>>>>>>> 3.1.x, specifically the serializers approach, was not working any
>>>>>>> longer
>>>>>>> with the new Swagger version, hence this update.
>>>>>>>
>>>>>>> I honestly do not know why exactly a JAXB annotated bean is not
>>>>&

Re: CXF 3.21 and bean validation

2017-11-30 Thread nino martinez wael
Somehow I cannot replicate the issue today !!! Not on my developer machine
or our test server! Typical when you fired up your debugger!

I am terrible sorry for the loss of your time Sergey :(

-Nino

On Fri, Dec 1, 2017 at 6:43 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Well its not a custom exception, unless you consider jax rs 2, my creation
> :)
>
> javax.ws.rs.NotAcceptableException
>
> I will digg into it, thanks for your patience.
>
> On Thu, Nov 30, 2017 at 3:31 PM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> Can you please debug ?
>>
>> Sergey
>>
>> On 30/11/17 14:08, Sergey Beryozkin wrote:
>>
>>> I'm sorry but I don't have time for dealing with some indirect
>>> assumptions that ValidationExceptionMapper which is typed with
>>> toResponse(ValidationException) somehow accepts your custom
>>> NotAcceptableException.
>>>
>>> Unless it is an instance of ValidationException ?
>>> On 30/11/17 14:02, nino martinez wael wrote:
>>>
>>>> When my app throws:
>>>>
>>>> throw new NotAcceptableException("Client tried with wrong format <" +
>>>> orgImportRecord.toString() + ">");
>>>>
>>>>
>>>> the client gets an 500.. looking in the log I can see that the
>>>> ValidationExceptionMapper is "responsible"..
>>>>
>>>>
>>>> I can come with an more complete example. if you want?
>>>>
>>>>
>>>>
>>>> On Thu, Nov 30, 2017 at 2:27 PM, Sergey Beryozkin <sberyoz...@gmail.com
>>>> >
>>>> wrote:
>>>>
>>>> How did you come to this conclusion ?
>>>>>
>>>>> Sergey
>>>>> On 30/11/17 13:22, nino martinez wael wrote:
>>>>>
>>>>> Hi
>>>>>>
>>>>>> Is it possible to use both
>>>>>>
>>>>>> org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper
>>>>>>
>>>>>> And
>>>>>>
>>>>>> org.apache.cxf.jaxrs.validation.JAXRSBeanValidationFeature/o
>>>>>> rg.apache.cxf.jaxrs.validation.ValidationExceptionMapper
>>>>>>
>>>>>> together.. Currently is seems the ValidationExceptionMapper are
>>>>>> catching my NotAcceptableException etc and coughing up 500's
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Sergey Beryozkin
>>>>>
>>>>> Talend Community Coders
>>>>> http://coders.talend.com/
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.21 and bean validation

2017-11-30 Thread nino martinez wael
Well its not a custom exception, unless you consider jax rs 2, my creation
:)

javax.ws.rs.NotAcceptableException

I will digg into it, thanks for your patience.

On Thu, Nov 30, 2017 at 3:31 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Can you please debug ?
>
> Sergey
>
> On 30/11/17 14:08, Sergey Beryozkin wrote:
>
>> I'm sorry but I don't have time for dealing with some indirect
>> assumptions that ValidationExceptionMapper which is typed with
>> toResponse(ValidationException) somehow accepts your custom
>> NotAcceptableException.
>>
>> Unless it is an instance of ValidationException ?
>> On 30/11/17 14:02, nino martinez wael wrote:
>>
>>> When my app throws:
>>>
>>> throw new NotAcceptableException("Client tried with wrong format <" +
>>> orgImportRecord.toString() + ">");
>>>
>>>
>>> the client gets an 500.. looking in the log I can see that the
>>> ValidationExceptionMapper is "responsible"..
>>>
>>>
>>> I can come with an more complete example. if you want?
>>>
>>>
>>>
>>> On Thu, Nov 30, 2017 at 2:27 PM, Sergey Beryozkin <sberyoz...@gmail.com>
>>> wrote:
>>>
>>> How did you come to this conclusion ?
>>>>
>>>> Sergey
>>>> On 30/11/17 13:22, nino martinez wael wrote:
>>>>
>>>> Hi
>>>>>
>>>>> Is it possible to use both
>>>>>
>>>>> org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper
>>>>>
>>>>> And
>>>>>
>>>>> org.apache.cxf.jaxrs.validation.JAXRSBeanValidationFeature/o
>>>>> rg.apache.cxf.jaxrs.validation.ValidationExceptionMapper
>>>>>
>>>>> together.. Currently is seems the ValidationExceptionMapper are
>>>>> catching my NotAcceptableException etc and coughing up 500's
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Sergey Beryozkin
>>>>
>>>> Talend Community Coders
>>>> http://coders.talend.com/
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.21 and bean validation

2017-11-30 Thread nino martinez wael
When my app throws:

throw new NotAcceptableException("Client tried with wrong format <" +
orgImportRecord.toString() + ">");


the client gets an 500.. looking in the log I can see that the
ValidationExceptionMapper is "responsible"..


I can come with an more complete example. if you want?



On Thu, Nov 30, 2017 at 2:27 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> How did you come to this conclusion ?
>
> Sergey
> On 30/11/17 13:22, nino martinez wael wrote:
>
>> Hi
>>
>> Is it possible to use both
>>
>> org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper
>>
>> And
>>
>> org.apache.cxf.jaxrs.validation.JAXRSBeanValidationFeature/o
>> rg.apache.cxf.jaxrs.validation.ValidationExceptionMapper
>>
>> together.. Currently is seems the ValidationExceptionMapper are
>> catching my NotAcceptableException etc and coughing up 500's
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


CXF 3.21 and bean validation

2017-11-30 Thread nino martinez wael
Hi

Is it possible to use both

org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper

And

org.apache.cxf.jaxrs.validation.JAXRSBeanValidationFeature/org.apache.cxf.jaxrs.validation.ValidationExceptionMapper

together.. Currently is seems the ValidationExceptionMapper are
catching my NotAcceptableException etc and coughing up 500's


-- 

Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
No change without setting swagger2customizer..

I'll let it rest for a day..

On Thu, Nov 30, 2017 at 1:30 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> yup have set skip.default.json.provider.registration..
>
> But no matter what I do it has no effect on what the swagger feature
> generates.. Where it's changing the json provider or removing it all
> together..
>
> Trying it now without setting swagger2Customizer..
>
>
> On Thu, Nov 30, 2017 at 1:04 PM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> Just FYI, removing Jettison lib will ensure it's not auto-installed by
>> CXF, and if it is not possible to remove then the other option is to set
>> a "skip.default.json.provider.registration" bus property.
>>
>> However it's not related to Swagger at all, Jettison if installed will
>> only affect the way JSON is generated for service responses
>>
>> Sergey
>>
>> On 30/11/17 11:57, nino martinez wael wrote:
>>
>>> It does not seem to be a jettison problem.. And neither an problem with
>>> jackson versions, I just wiped all jettison and jackson(except 2.9.1 )
>>> versions from my running environment..
>>>
>>> Looking into of it could be something with JacksonJaxbJsonProvider vs
>>> JacksonJsonProvider
>>>
>>> On Thu, Nov 30, 2017 at 12:45 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> IS there somewhere while on runtime where I can print current registered
>>>> providers for cxf, I have a feeling that it somehow are using jettison
>>>> for
>>>> json...
>>>>
>>>> On Thu, Nov 30, 2017 at 12:17 PM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> Okay I will check into libraries whats on class path.. I have the same
>>>>> gut feeling that it could be something like that.
>>>>>
>>>>> I have enunciate up and working on the side..
>>>>>
>>>>> On Thu, Nov 30, 2017 at 11:18 AM, Sergey Beryozkin <
>>>>> sberyoz...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Yes, the minor Swagger version caused this change, what was working
>>>>>> 3.1.x, specifically the serializers approach, was not working any
>>>>>> longer
>>>>>> with the new Swagger version, hence this update.
>>>>>>
>>>>>> I honestly do not know why exactly a JAXB annotated bean is not
>>>>>> correctly represented in the Swagger-generated #definitions, it's
>>>>>> obviously
>>>>>> something to do with the way Jackson and JAXB interacts.
>>>>>> Perhaps Jackson you register with DOSGI is not the same version
>>>>>> installed by the CXF swagger2 feature, perhaps some diff JAXB
>>>>>> versions are
>>>>>> involved, please keep experimenting
>>>>>>
>>>>>> Sergey
>>>>>>
>>>>>> defaultSwagger2Serializers.setJavadocProvider(new JavaDocProvider());
>>>>>>
>>>>>>> swagger.setSwagger2Serializers(defaultSwagger2Serializers);
>>>>>>>
>>>>>>> I think this could be the same:
>>>>>>>
>>>>>>> Swagger2Customizer swagger2Customizer = new Swagger2Customizer();
>>>>>>> swagger2Customizer.setJavadocProvider(new JavaDocProvider());
>>>>>>>
>>>>>>>
>>>>>>> swagger.setCustomizer(swagger2Customizer);
>>>>>>>
>>>>>>>
>>>>>>> I have setup CXF to use JACKSON (JacksonJaxbJsonProvider)
>>>>>>>
>>>>>>>
>>>>>>> How can I tell swagger to do the same? I think that's the problem..
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> regards Nino
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Nov 30, 2017 at 10:50 AM, nino martinez wael <
>>>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>>>
>>>>>>> Im wondering if this could be the problem :
>>>>>>>
>>>>>>>>
>>>>>>>> https://github.com/swagger-api/swagger-core/issues/960
>>>>>>>>
>

Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
yup have set skip.default.json.provider.registration..

But no matter what I do it has no effect on what the swagger feature
generates.. Where it's changing the json provider or removing it all
together..

Trying it now without setting swagger2Customizer..


On Thu, Nov 30, 2017 at 1:04 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Just FYI, removing Jettison lib will ensure it's not auto-installed by
> CXF, and if it is not possible to remove then the other option is to set
> a "skip.default.json.provider.registration" bus property.
>
> However it's not related to Swagger at all, Jettison if installed will
> only affect the way JSON is generated for service responses
>
> Sergey
>
> On 30/11/17 11:57, nino martinez wael wrote:
>
>> It does not seem to be a jettison problem.. And neither an problem with
>> jackson versions, I just wiped all jettison and jackson(except 2.9.1 )
>> versions from my running environment..
>>
>> Looking into of it could be something with JacksonJaxbJsonProvider vs
>> JacksonJsonProvider
>>
>> On Thu, Nov 30, 2017 at 12:45 PM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> IS there somewhere while on runtime where I can print current registered
>>> providers for cxf, I have a feeling that it somehow are using jettison
>>> for
>>> json...
>>>
>>> On Thu, Nov 30, 2017 at 12:17 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> Okay I will check into libraries whats on class path.. I have the same
>>>> gut feeling that it could be something like that.
>>>>
>>>> I have enunciate up and working on the side..
>>>>
>>>> On Thu, Nov 30, 2017 at 11:18 AM, Sergey Beryozkin <
>>>> sberyoz...@gmail.com>
>>>> wrote:
>>>>
>>>> Yes, the minor Swagger version caused this change, what was working
>>>>> 3.1.x, specifically the serializers approach, was not working any
>>>>> longer
>>>>> with the new Swagger version, hence this update.
>>>>>
>>>>> I honestly do not know why exactly a JAXB annotated bean is not
>>>>> correctly represented in the Swagger-generated #definitions, it's
>>>>> obviously
>>>>> something to do with the way Jackson and JAXB interacts.
>>>>> Perhaps Jackson you register with DOSGI is not the same version
>>>>> installed by the CXF swagger2 feature, perhaps some diff JAXB versions
>>>>> are
>>>>> involved, please keep experimenting
>>>>>
>>>>> Sergey
>>>>>
>>>>> defaultSwagger2Serializers.setJavadocProvider(new JavaDocProvider());
>>>>>
>>>>>> swagger.setSwagger2Serializers(defaultSwagger2Serializers);
>>>>>>
>>>>>> I think this could be the same:
>>>>>>
>>>>>> Swagger2Customizer swagger2Customizer = new Swagger2Customizer();
>>>>>> swagger2Customizer.setJavadocProvider(new JavaDocProvider());
>>>>>>
>>>>>>
>>>>>> swagger.setCustomizer(swagger2Customizer);
>>>>>>
>>>>>>
>>>>>> I have setup CXF to use JACKSON (JacksonJaxbJsonProvider)
>>>>>>
>>>>>>
>>>>>> How can I tell swagger to do the same? I think that's the problem..
>>>>>>
>>>>>>
>>>>>>
>>>>>> regards Nino
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Nov 30, 2017 at 10:50 AM, nino martinez wael <
>>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>>
>>>>>> Im wondering if this could be the problem :
>>>>>>
>>>>>>>
>>>>>>> https://github.com/swagger-api/swagger-core/issues/960
>>>>>>>
>>>>>>> On Thu, Nov 30, 2017 at 10:38 AM, nino martinez wael <
>>>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>>>
>>>>>>> So I have a bean CXF accepts only this interpretation for my
>>>>>>> endpoint:
>>>>>>>
>>>>>>>>
>>>>>>>> {
>>>>>>>>   "contactList": [
>>>>>>>>   {
>>>>>>>>   "campaig

Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
It does not seem to be a jettison problem.. And neither an problem with
jackson versions, I just wiped all jettison and jackson(except 2.9.1 )
versions from my running environment..

Looking into of it could be something with JacksonJaxbJsonProvider vs
JacksonJsonProvider

On Thu, Nov 30, 2017 at 12:45 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> IS there somewhere while on runtime where I can print current registered
> providers for cxf, I have a feeling that it somehow are using jettison for
> json...
>
> On Thu, Nov 30, 2017 at 12:17 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> Okay I will check into libraries whats on class path.. I have the same
>> gut feeling that it could be something like that.
>>
>> I have enunciate up and working on the side..
>>
>> On Thu, Nov 30, 2017 at 11:18 AM, Sergey Beryozkin <sberyoz...@gmail.com>
>> wrote:
>>
>>> Yes, the minor Swagger version caused this change, what was working
>>> 3.1.x, specifically the serializers approach, was not working any longer
>>> with the new Swagger version, hence this update.
>>>
>>> I honestly do not know why exactly a JAXB annotated bean is not
>>> correctly represented in the Swagger-generated #definitions, it's obviously
>>> something to do with the way Jackson and JAXB interacts.
>>> Perhaps Jackson you register with DOSGI is not the same version
>>> installed by the CXF swagger2 feature, perhaps some diff JAXB versions are
>>> involved, please keep experimenting
>>>
>>> Sergey
>>>
>>> defaultSwagger2Serializers.setJavadocProvider(new JavaDocProvider());
>>>> swagger.setSwagger2Serializers(defaultSwagger2Serializers);
>>>>
>>>> I think this could be the same:
>>>>
>>>> Swagger2Customizer swagger2Customizer = new Swagger2Customizer();
>>>> swagger2Customizer.setJavadocProvider(new JavaDocProvider());
>>>>
>>>>
>>>> swagger.setCustomizer(swagger2Customizer);
>>>>
>>>>
>>>> I have setup CXF to use JACKSON (JacksonJaxbJsonProvider)
>>>>
>>>>
>>>> How can I tell swagger to do the same? I think that's the problem..
>>>>
>>>>
>>>>
>>>> regards Nino
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Nov 30, 2017 at 10:50 AM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> Im wondering if this could be the problem :
>>>>>
>>>>> https://github.com/swagger-api/swagger-core/issues/960
>>>>>
>>>>> On Thu, Nov 30, 2017 at 10:38 AM, nino martinez wael <
>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>
>>>>> So I have a bean CXF accepts only this interpretation for my endpoint:
>>>>>>
>>>>>> {
>>>>>>  "contactList": [
>>>>>>  {
>>>>>>  "campaignId": "2",
>>>>>>  "id":"",
>>>>>>  "indexNumber": "",
>>>>>>  "accountNumber": "232",
>>>>>>  "queueNumber": "0",
>>>>>>  "balance": 0,
>>>>>>  "personalIdentificationNumber1": "string",
>>>>>>  "firstName1": "string",
>>>>>>  "lastName1": "string",
>>>>>>  "personalIdentificationNumber2": "string",
>>>>>>  "firstName2": "string",
>>>>>>  "lastName2": "string",
>>>>>>  "address": "string",
>>>>>>  "zipCode": "string",
>>>>>>  "city": "string",
>>>>>>  "homePhone": "+4521",
>>>>>>  "mobilePhone": "+45122",
>>>>>>  "campaing": "string",
>>>>>>  "dateForExtract": "string"
>>>>>>
>>>>>>  }
>>>>>>  ]
&

Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
IS there somewhere while on runtime where I can print current registered
providers for cxf, I have a feeling that it somehow are using jettison for
json...

On Thu, Nov 30, 2017 at 12:17 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Okay I will check into libraries whats on class path.. I have the same gut
> feeling that it could be something like that.
>
> I have enunciate up and working on the side..
>
> On Thu, Nov 30, 2017 at 11:18 AM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> Yes, the minor Swagger version caused this change, what was working
>> 3.1.x, specifically the serializers approach, was not working any longer
>> with the new Swagger version, hence this update.
>>
>> I honestly do not know why exactly a JAXB annotated bean is not correctly
>> represented in the Swagger-generated #definitions, it's obviously something
>> to do with the way Jackson and JAXB interacts.
>> Perhaps Jackson you register with DOSGI is not the same version installed
>> by the CXF swagger2 feature, perhaps some diff JAXB versions are involved,
>> please keep experimenting
>>
>> Sergey
>>
>> defaultSwagger2Serializers.setJavadocProvider(new JavaDocProvider());
>>> swagger.setSwagger2Serializers(defaultSwagger2Serializers);
>>>
>>> I think this could be the same:
>>>
>>> Swagger2Customizer swagger2Customizer = new Swagger2Customizer();
>>> swagger2Customizer.setJavadocProvider(new JavaDocProvider());
>>>
>>>
>>> swagger.setCustomizer(swagger2Customizer);
>>>
>>>
>>> I have setup CXF to use JACKSON (JacksonJaxbJsonProvider)
>>>
>>>
>>> How can I tell swagger to do the same? I think that's the problem..
>>>
>>>
>>>
>>> regards Nino
>>>
>>>
>>>
>>>
>>> On Thu, Nov 30, 2017 at 10:50 AM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> Im wondering if this could be the problem :
>>>>
>>>> https://github.com/swagger-api/swagger-core/issues/960
>>>>
>>>> On Thu, Nov 30, 2017 at 10:38 AM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> So I have a bean CXF accepts only this interpretation for my endpoint:
>>>>>
>>>>> {
>>>>>  "contactList": [
>>>>>  {
>>>>>  "campaignId": "2",
>>>>>  "id":"",
>>>>>  "indexNumber": "",
>>>>>  "accountNumber": "232",
>>>>>  "queueNumber": "0",
>>>>>  "balance": 0,
>>>>>  "personalIdentificationNumber1": "string",
>>>>>  "firstName1": "string",
>>>>>  "lastName1": "string",
>>>>>  "personalIdentificationNumber2": "string",
>>>>>  "firstName2": "string",
>>>>>  "lastName2": "string",
>>>>>  "address": "string",
>>>>>  "zipCode": "string",
>>>>>  "city": "string",
>>>>>  "homePhone": "+4521",
>>>>>  "mobilePhone": "+45122",
>>>>>  "campaing": "string",
>>>>>  "dateForExtract": "string"
>>>>>
>>>>>  }
>>>>>  ]
>>>>> }
>>>>>
>>>>> However the swagger feature are generating this as example:
>>>>>
>>>>> {
>>>>>"minimalContacts": [
>>>>>  {
>>>>>"campaignId": "string",
>>>>>"id": 0,
>>>>>"indexNumber": "string",
>>>>>"accountNumber": "string",
>>>>>"queueNumber": "string",
>>>>>"balance": 0,
>>>>>"personalIdentificationNumber1": "string",
>>>>>"f

Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
Okay I will check into libraries whats on class path.. I have the same gut
feeling that it could be something like that.

I have enunciate up and working on the side..

On Thu, Nov 30, 2017 at 11:18 AM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Yes, the minor Swagger version caused this change, what was working 3.1.x,
> specifically the serializers approach, was not working any longer with the
> new Swagger version, hence this update.
>
> I honestly do not know why exactly a JAXB annotated bean is not correctly
> represented in the Swagger-generated #definitions, it's obviously something
> to do with the way Jackson and JAXB interacts.
> Perhaps Jackson you register with DOSGI is not the same version installed
> by the CXF swagger2 feature, perhaps some diff JAXB versions are involved,
> please keep experimenting
>
> Sergey
>
> defaultSwagger2Serializers.setJavadocProvider(new JavaDocProvider());
>> swagger.setSwagger2Serializers(defaultSwagger2Serializers);
>>
>> I think this could be the same:
>>
>> Swagger2Customizer swagger2Customizer = new Swagger2Customizer();
>> swagger2Customizer.setJavadocProvider(new JavaDocProvider());
>>
>>
>> swagger.setCustomizer(swagger2Customizer);
>>
>>
>> I have setup CXF to use JACKSON (JacksonJaxbJsonProvider)
>>
>>
>> How can I tell swagger to do the same? I think that's the problem..
>>
>>
>>
>> regards Nino
>>
>>
>>
>>
>> On Thu, Nov 30, 2017 at 10:50 AM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> Im wondering if this could be the problem :
>>>
>>> https://github.com/swagger-api/swagger-core/issues/960
>>>
>>> On Thu, Nov 30, 2017 at 10:38 AM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> So I have a bean CXF accepts only this interpretation for my endpoint:
>>>>
>>>> {
>>>>  "contactList": [
>>>>  {
>>>>  "campaignId": "2",
>>>>  "id":"",
>>>>  "indexNumber": "",
>>>>  "accountNumber": "232",
>>>>  "queueNumber": "0",
>>>>  "balance": 0,
>>>>  "personalIdentificationNumber1": "string",
>>>>  "firstName1": "string",
>>>>  "lastName1": "string",
>>>>  "personalIdentificationNumber2": "string",
>>>>  "firstName2": "string",
>>>>  "lastName2": "string",
>>>>  "address": "string",
>>>>  "zipCode": "string",
>>>>  "city": "string",
>>>>  "homePhone": "+4521",
>>>>  "mobilePhone": "+45122",
>>>>  "campaing": "string",
>>>>  "dateForExtract": "string"
>>>>
>>>>  }
>>>>  ]
>>>> }
>>>>
>>>> However the swagger feature are generating this as example:
>>>>
>>>> {
>>>>"minimalContacts": [
>>>>  {
>>>>"campaignId": "string",
>>>>"id": 0,
>>>>"indexNumber": "string",
>>>>"accountNumber": "string",
>>>>"queueNumber": "string",
>>>>"balance": 0,
>>>>"personalIdentificationNumber1": "string",
>>>>"firstName1": "string",
>>>>"lastName1": "string",
>>>>"personalIdentificationNumber2": "string",
>>>>"firstName2": "string",
>>>>"lastName2": "string",
>>>>"address": "string",
>>>>"zipCode": "string",
>>>>"city": "string",
>>>>"homePhone": "string",
>>>>"mobilePhone": "string",
&

Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
Okay I think something changed from cxf swagger 3.1.x to 3.2.x Earlier on I
could specify this :

DefaultSwagger2Serializers defaultSwagger2Serializers = new
DefaultSwagger2Serializers();
defaultSwagger2Serializers.setJavadocProvider(new JavaDocProvider());
swagger.setSwagger2Serializers(defaultSwagger2Serializers);

I think this could be the same:

Swagger2Customizer swagger2Customizer = new Swagger2Customizer();
swagger2Customizer.setJavadocProvider(new JavaDocProvider());


swagger.setCustomizer(swagger2Customizer);


I have setup CXF to use JACKSON (JacksonJaxbJsonProvider)


How can I tell swagger to do the same? I think that's the problem..



regards Nino




On Thu, Nov 30, 2017 at 10:50 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Im wondering if this could be the problem :
>
> https://github.com/swagger-api/swagger-core/issues/960
>
> On Thu, Nov 30, 2017 at 10:38 AM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> So I have a bean CXF accepts only this interpretation for my endpoint:
>>
>> {
>> "contactList": [
>> {
>> "campaignId": "2",
>> "id":"",
>> "indexNumber": "",
>> "accountNumber": "232",
>> "queueNumber": "0",
>> "balance": 0,
>> "personalIdentificationNumber1": "string",
>> "firstName1": "string",
>> "lastName1": "string",
>> "personalIdentificationNumber2": "string",
>> "firstName2": "string",
>> "lastName2": "string",
>> "address": "string",
>> "zipCode": "string",
>> "city": "string",
>> "homePhone": "+4521",
>> "mobilePhone": "+45122",
>> "campaing": "string",
>> "dateForExtract": "string"
>>
>> }
>> ]
>> }
>>
>> However the swagger feature are generating this as example:
>>
>> {
>>   "minimalContacts": [
>> {
>>   "campaignId": "string",
>>   "id": 0,
>>   "indexNumber": "string",
>>   "accountNumber": "string",
>>   "queueNumber": "string",
>>   "balance": 0,
>>   "personalIdentificationNumber1": "string",
>>   "firstName1": "string",
>>   "lastName1": "string",
>>   "personalIdentificationNumber2": "string",
>>   "firstName2": "string",
>>   "lastName2": "string",
>>   "address": "string",
>>   "zipCode": "string",
>>   "city": "string",
>>   "homePhone": "string",
>>   "mobilePhone": "string",
>>   "campaing": "string",
>>   "dateForExtract": "string"
>> }
>>   ]
>> }
>>
>> MinimalContactWrapper
>>
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlRootElement(name = "contacts")
>> public class MinimalContactWrapper {
>>
>> @XmlElementWrapper
>> @XmlElementRef
>> @Valid
>> @NotNull
>> @Size(min = 1)
>> private List contactList=new ArrayList<>();
>>
>> public List getMinimalContacts() {
>> return contactList;
>> }
>>
>> public void setMinimalContacts(List minimalContacts) {
>> this.contactList = minimalContacts;
>> }
>>
>>
>> MinimalContact
>>
>> @XmlAccessorType(XmlAccessType.PROPERTY)
>> @XmlRootElement(name="minimalcontact")
>> public class MinimalContact {
>>
>> @NotNull
>> @Size(min=1, max=240)
>> private String campaignId;
>>
>> private Long id;
>> @Size(min=1, max=240)
>> private String indexNumber;
>> @Size(min=1, max=20)
>> @NotNull
>> private String accountNumber;
>> @Size(min=1, max=8)
>> private String queueNumber;
>>
>>
>> private Float balance;
>>
>> @Size(min=0, max=11)
>> private String personalIdentificationNumber1;
>>
>> @Size(min=0, max=55)
>> private String firstName1;
>>
>> @Size(min=0, max=55)
>> private String lastName1;
>>
>> @Size(min=0, max=11)
>> private String personalIdentificationNumber2;
>>
>> private String firstName2;
>>
>> private String lastName2;
>>
>> private String address;
>>
>> private String zipCode;
>> private String city;
>>
>> @NotNull
>> @Size(min=0, max=20)
>> private String homePhone;
>>
>> @NotNull
>> @Size(min=0, max=20)
>> private String mobilePhone;
>>
>> private String campaing;
>>
>> @NotNull
>> private String dateForExtract;
>>
>>
>>
>>
>>
>>
>> --
>> Best regards / Med venlig hilsen
>> Nino Martinez
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
Im wondering if this could be the problem :

https://github.com/swagger-api/swagger-core/issues/960

On Thu, Nov 30, 2017 at 10:38 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> So I have a bean CXF accepts only this interpretation for my endpoint:
>
> {
> "contactList": [
> {
> "campaignId": "2",
> "id":"",
> "indexNumber": "",
> "accountNumber": "232",
> "queueNumber": "0",
> "balance": 0,
> "personalIdentificationNumber1": "string",
> "firstName1": "string",
> "lastName1": "string",
> "personalIdentificationNumber2": "string",
> "firstName2": "string",
> "lastName2": "string",
> "address": "string",
> "zipCode": "string",
> "city": "string",
> "homePhone": "+4521",
> "mobilePhone": "+45122",
> "campaing": "string",
> "dateForExtract": "string"
>
> }
> ]
> }
>
> However the swagger feature are generating this as example:
>
> {
>   "minimalContacts": [
> {
>   "campaignId": "string",
>   "id": 0,
>   "indexNumber": "string",
>   "accountNumber": "string",
>   "queueNumber": "string",
>   "balance": 0,
>   "personalIdentificationNumber1": "string",
>   "firstName1": "string",
>   "lastName1": "string",
>   "personalIdentificationNumber2": "string",
>   "firstName2": "string",
>   "lastName2": "string",
>   "address": "string",
>   "zipCode": "string",
>   "city": "string",
>   "homePhone": "string",
>   "mobilePhone": "string",
>   "campaing": "string",
>   "dateForExtract": "string"
> }
>   ]
> }
>
> MinimalContactWrapper
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlRootElement(name = "contacts")
> public class MinimalContactWrapper {
>
> @XmlElementWrapper
> @XmlElementRef
> @Valid
> @NotNull
> @Size(min = 1)
> private List contactList=new ArrayList<>();
>
> public List getMinimalContacts() {
> return contactList;
> }
>
> public void setMinimalContacts(List minimalContacts) {
> this.contactList = minimalContacts;
> }
>
>
> MinimalContact
>
> @XmlAccessorType(XmlAccessType.PROPERTY)
> @XmlRootElement(name="minimalcontact")
> public class MinimalContact {
>
> @NotNull
> @Size(min=1, max=240)
> private String campaignId;
>
> private Long id;
> @Size(min=1, max=240)
> private String indexNumber;
> @Size(min=1, max=20)
> @NotNull
> private String accountNumber;
> @Size(min=1, max=8)
> private String queueNumber;
>
>
> private Float balance;
>
> @Size(min=0, max=11)
> private String personalIdentificationNumber1;
>
> @Size(min=0, max=55)
> private String firstName1;
>
> @Size(min=0, max=55)
> private String lastName1;
>
> @Size(min=0, max=11)
> private String personalIdentificationNumber2;
>
> private String firstName2;
>
> private String lastName2;
>
> private String address;
>
> private String zipCode;
> private String city;
>
> @NotNull
> @Size(min=0, max=20)
> private String homePhone;
>
> @NotNull
> @Size(min=0, max=20)
> private String mobilePhone;
>
> private String campaing;
>
> @NotNull
> private String dateForExtract;
>
>
>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


CXF 3.2.1 swagger generation are wrong for json

2017-11-30 Thread nino martinez wael
So I have a bean CXF accepts only this interpretation for my endpoint:

{
"contactList": [
{
"campaignId": "2",
"id":"",
"indexNumber": "",
"accountNumber": "232",
"queueNumber": "0",
"balance": 0,
"personalIdentificationNumber1": "string",
"firstName1": "string",
"lastName1": "string",
"personalIdentificationNumber2": "string",
"firstName2": "string",
"lastName2": "string",
"address": "string",
"zipCode": "string",
"city": "string",
"homePhone": "+4521",
"mobilePhone": "+45122",
"campaing": "string",
"dateForExtract": "string"

}
]
}

However the swagger feature are generating this as example:

{
  "minimalContacts": [
{
  "campaignId": "string",
  "id": 0,
  "indexNumber": "string",
  "accountNumber": "string",
  "queueNumber": "string",
  "balance": 0,
  "personalIdentificationNumber1": "string",
  "firstName1": "string",
  "lastName1": "string",
  "personalIdentificationNumber2": "string",
  "firstName2": "string",
  "lastName2": "string",
  "address": "string",
  "zipCode": "string",
  "city": "string",
  "homePhone": "string",
  "mobilePhone": "string",
  "campaing": "string",
  "dateForExtract": "string"
}
  ]
}

MinimalContactWrapper

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "contacts")
public class MinimalContactWrapper {

@XmlElementWrapper
@XmlElementRef
@Valid
@NotNull
@Size(min = 1)
private List contactList=new ArrayList<>();

public List getMinimalContacts() {
return contactList;
}

public void setMinimalContacts(List minimalContacts) {
this.contactList = minimalContacts;
}


MinimalContact

@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlRootElement(name="minimalcontact")
public class MinimalContact {

@NotNull
@Size(min=1, max=240)
private String campaignId;

private Long id;
@Size(min=1, max=240)
private String indexNumber;
@Size(min=1, max=20)
@NotNull
private String accountNumber;
@Size(min=1, max=8)
private String queueNumber;


private Float balance;

@Size(min=0, max=11)
private String personalIdentificationNumber1;

@Size(min=0, max=55)
private String firstName1;

@Size(min=0, max=55)
private String lastName1;

@Size(min=0, max=11)
private String personalIdentificationNumber2;

private String firstName2;

private String lastName2;

private String address;

private String zipCode;
private String city;

@NotNull
@Size(min=0, max=20)
private String homePhone;

@NotNull
@Size(min=0, max=20)
private String mobilePhone;

private String campaing;

@NotNull
private String dateForExtract;






-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF DOSGI

2017-11-30 Thread nino martinez wael
As you mentioned earlier on, make sure the desired CXF version are
installed before installing DOSGI . like so in the assembly pom:


org.apache.cxf.karaf
apache-cxf
features
xml
runtime
${cxf.version}



And then



org.apache.karaf.tooling
karaf-maven-plugin
true


wrapper
*cxf*

...


On Thu, Nov 30, 2017 at 9:04 AM, Christian Schneider <
ch...@die-schneider.net> wrote:

> Nice .. Do you have any lessons learned for other who try this?
>
> Christian
>
> 2017-11-28 14:39 GMT+01:00 nino martinez wael <
> nino.martinez.w...@gmail.com>
> :
>
> > I actually got it working..
> >
> > On Wed, Nov 22, 2017 at 1:07 PM, nino martinez wael <
> > nino.martinez.w...@gmail.com> wrote:
> >
> > > I can't seem to get it to work..
> > >
> > >
> > >
> > >
> > > On Fri, Nov 10, 2017 at 10:54 AM, Christian Schneider <
> > > ch...@die-schneider.net> wrote:
> > >
> > >> Yes it would but karaf would then select the newer version. Can you
> try
> > if
> > >> this works for you? If not I will do a CXF-DOSGi release.
> > >>
> > >> Christian
> > >>
> > >> 2017-11-10 7:00 GMT+01:00 nino martinez wael <
> > >> nino.martinez.w...@gmail.com>:
> > >>
> > >> > Yes.. But would'nt CXF-DOSGI pull in it's on repo in the older
> > version?
> > >> We
> > >> > are building an an offline karaf assembly.
> > >> >
> > >> > https://github.com/apache/cxf-dosgi/blob/master/distribution
> > >> /features/src/
> > >> > main/resources/features.xml
> > >> > Line 3?
> > >> >
> > >> > -regards Nino
> > >> >
> > >> > On Wed, Nov 8, 2017 at 5:25 PM, Christian Schneider <
> > >> > ch...@die-schneider.net
> > >> > > wrote:
> > >> >
> > >> > > Do you use CXF-DOSGi with Karaf?
> > >> > > If yes then you can simply add the cxf repository in version 3.2.1
> > in
> > >> > > addition to cxf-dosgi. Karaf should then use the newer cxf.
> > >> > >
> > >> > > Christian
> > >> > >
> > >> > > 2017-11-08 9:27 GMT+01:00 nino martinez wael <
> > >> > nino.martinez.w...@gmail.com
> > >> > > >:
> > >> > >
> > >> > > > Hi
> > >> > > >
> > >> > > > Could we get an new release that depends on CXF 3.2.1..
> > >> > > >
> > >> > > > It has an crucial update regarding swagger..
> > >> > > >
> > >> > > > --
> > >> > > > Best regards / Med venlig hilsen
> > >> > > > Nino Martinez
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > --
> > >> > > Christian Schneider
> > >> > > http://www.liquid-reality.de
> > >> > > <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
> > >> 2bd062c5a7e
> > >> > > 46=http%3a%2f%2fwww.liquid-reality.de>
> > >> > >
> > >> > > Computer Scientist
> > >> > > http://www.adobe.com
> > >> > >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Best regards / Med venlig hilsen
> > >> > Nino Martinez
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> --
> > >> Christian Schneider
> > >> http://www.liquid-reality.de
> > >> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
> > >> 2bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>
> > >>
> > >> Computer Scientist
> > >> http://www.adobe.com
> > >>
> > >
> > >
> > >
> > > --
> > > Best regards / Med venlig hilsen
> > > Nino Martinez
> > >
> >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.2.1 JAX RS and bean validation

2017-11-29 Thread nino martinez wael
Cool thanks a lot:)

On Wed, Nov 29, 2017 at 2:03 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> It has an optional addMessageToResponse property,
>
> and you can always customize, example, as David suggested, create your own
> mapper, may be it will just extend ValidationExceptionMapper and set its
> addMessageToResponse to true, etc
>
> Cheers, Sergey
>
> On 29/11/17 09:17, nino martinez wael wrote:
>
>> I would think that was exactly what
>> org.apache.cxf.jaxrs.validation.ValidationExceptionMapper
>> did?
>>
>>
>> regards Nino
>>
>> On Wed, Nov 29, 2017 at 9:10 AM, David Karlsen <davidkarl...@gmail.com>
>> wrote:
>>
>> You could maybe implement an ExceptionMapper to handle them and transform
>>> over to the wanted output format:
>>> https://docs.oracle.com/javaee/7/api/javax/ws/rs/ext/Excepti
>>> onMapper.html
>>> https://dennis-xlc.gitbooks.io/restful-java-with-jax-rs-2-
>>> 0-2rd-edition/en/part1/chapter7/exception_handling.html
>>>
>>>
>>> 2017-11-29 8:51 GMT+01:00 nino martinez wael <
>>> nino.martinez.w...@gmail.com
>>>
>>>> :
>>>>
>>>
>>> Hi are there anyway to setup so the response vill give a more verbose
>>>> output when validation fails?
>>>>
>>>> Currently when my validation fails, all constraints are printed in the
>>>> server log with details, but the client just receive a 400 bad request..
>>>>
>>>> Would be very nice for the client a little more detail on what went
>>>>
>>> wrong..
>>>
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>>>
>>>
>>
>>
>>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF 3.2.1 JAX RS and bean validation

2017-11-29 Thread nino martinez wael
I would think that was exactly what
org.apache.cxf.jaxrs.validation.ValidationExceptionMapper
did?


regards Nino

On Wed, Nov 29, 2017 at 9:10 AM, David Karlsen <davidkarl...@gmail.com>
wrote:

> You could maybe implement an ExceptionMapper to handle them and transform
> over to the wanted output format:
> https://docs.oracle.com/javaee/7/api/javax/ws/rs/ext/ExceptionMapper.html
> https://dennis-xlc.gitbooks.io/restful-java-with-jax-rs-2-
> 0-2rd-edition/en/part1/chapter7/exception_handling.html
>
>
> 2017-11-29 8:51 GMT+01:00 nino martinez wael <nino.martinez.w...@gmail.com
> >:
>
> > Hi are there anyway to setup so the response vill give a more verbose
> > output when validation fails?
> >
> > Currently when my validation fails, all constraints are printed in the
> > server log with details, but the client just receive a 400 bad request..
> >
> > Would be very nice for the client a little more detail on what went
> wrong..
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


CXF 3.2.1 JAX RS and bean validation

2017-11-28 Thread nino martinez wael
Hi are there anyway to setup so the response vill give a more verbose
output when validation fails?

Currently when my validation fails, all constraints are printed in the
server log with details, but the client just receive a 400 bad request..

Would be very nice for the client a little more detail on what went wrong..

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI, exception mapper?

2017-11-28 Thread nino martinez wael
Okay got it working by doing this:

@Component //
(//
property = "org.apache.cxf.dosgi.IntentName=jackson" //
)
public class JacksonIntent implements Callable<List> {

@Override
public List call() throws Exception {
JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new
JacksonJaxbJsonProvider();


BeanValidationProvider beanValidationProvider=new
BeanValidationProvider(new OSGIHibernateValidationDiscoverer());



BeanValidationFeature beanValidationFeature = new
BeanValidationFeature();
 beanValidationFeature.setProvider(beanValidationProvider);


return Arrays.asList((Object) jacksonJaxbJsonProvider,
beanValidationFeature, new ValidationExceptionMapper(), new
JAXRSParameterNameProvider());
}

}


On Tue, Nov 28, 2017 at 2:51 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Hi
>
> How do I register an additional exception mapper?
>
> Apparently I need to register 
> org.apache.cxf.jaxrs.validation.ValidationExceptionMapper
> if I want to provide an meaningfull description for my users.
>
> I have tried doing it as an intent, by extending from
> org.apache.cxf.jaxrs.validation.ValidationExceptionMapper.. and adding it
> as an @component and @provider:
>
> java.lang.RuntimeException: service cannot be exported because the
> following intents are not supported by this RSA: [validationexceptionmapper]
> at org.apache.cxf.dosgi.common.intent.impl.IntentManagerImpl.
> assertAllIntentsSupported(IntentManagerImpl.java:175)
>
>
> Code for reference:
>
> @Component //
> (
> property = 
> "org.apache.cxf.dosgi.IntentName=validationexceptionmapper" //
> )
> @Provider
> public class ReadableExceptions extends ValidationExceptionMapper  {
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI, exception mapper?

2017-11-28 Thread nino martinez wael
Hi

How do I register an additional exception mapper?

Apparently I need to register
org.apache.cxf.jaxrs.validation.ValidationExceptionMapper
if I want to provide an meaningfull description for my users.

I have tried doing it as an intent, by extending from
org.apache.cxf.jaxrs.validation.ValidationExceptionMapper..
and adding it as an @component and @provider:

java.lang.RuntimeException: service cannot be exported because the
following intents are not supported by this RSA: [validationexceptionmapper]
at
org.apache.cxf.dosgi.common.intent.impl.IntentManagerImpl.assertAllIntentsSupported(IntentManagerImpl.java:175)


Code for reference:

@Component //
(
property =
"org.apache.cxf.dosgi.IntentName=validationexceptionmapper" //
)
@Provider
public class ReadableExceptions extends ValidationExceptionMapper  {


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF DOSGI

2017-11-28 Thread nino martinez wael
I actually got it working..

On Wed, Nov 22, 2017 at 1:07 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> I can't seem to get it to work..
>
>
>
>
> On Fri, Nov 10, 2017 at 10:54 AM, Christian Schneider <
> ch...@die-schneider.net> wrote:
>
>> Yes it would but karaf would then select the newer version. Can you try if
>> this works for you? If not I will do a CXF-DOSGi release.
>>
>> Christian
>>
>> 2017-11-10 7:00 GMT+01:00 nino martinez wael <
>> nino.martinez.w...@gmail.com>:
>>
>> > Yes.. But would'nt CXF-DOSGI pull in it's on repo in the older version?
>> We
>> > are building an an offline karaf assembly.
>> >
>> > https://github.com/apache/cxf-dosgi/blob/master/distribution
>> /features/src/
>> > main/resources/features.xml
>> > Line 3?
>> >
>> > -regards Nino
>> >
>> > On Wed, Nov 8, 2017 at 5:25 PM, Christian Schneider <
>> > ch...@die-schneider.net
>> > > wrote:
>> >
>> > > Do you use CXF-DOSGi with Karaf?
>> > > If yes then you can simply add the cxf repository in version 3.2.1 in
>> > > addition to cxf-dosgi. Karaf should then use the newer cxf.
>> > >
>> > > Christian
>> > >
>> > > 2017-11-08 9:27 GMT+01:00 nino martinez wael <
>> > nino.martinez.w...@gmail.com
>> > > >:
>> > >
>> > > > Hi
>> > > >
>> > > > Could we get an new release that depends on CXF 3.2.1..
>> > > >
>> > > > It has an crucial update regarding swagger..
>> > > >
>> > > > --
>> > > > Best regards / Med venlig hilsen
>> > > > Nino Martinez
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > --
>> > > Christian Schneider
>> > > http://www.liquid-reality.de
>> > > <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>> 2bd062c5a7e
>> > > 46=http%3a%2f%2fwww.liquid-reality.de>
>> > >
>> > > Computer Scientist
>> > > http://www.adobe.com
>> > >
>> >
>> >
>> >
>> > --
>> > Best regards / Med venlig hilsen
>> > Nino Martinez
>> >
>>
>>
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>> 2bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>
>>
>> Computer Scientist
>> http://www.adobe.com
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF DOSGI

2017-11-22 Thread nino martinez wael
I can't seem to get it to work..




On Fri, Nov 10, 2017 at 10:54 AM, Christian Schneider <
ch...@die-schneider.net> wrote:

> Yes it would but karaf would then select the newer version. Can you try if
> this works for you? If not I will do a CXF-DOSGi release.
>
> Christian
>
> 2017-11-10 7:00 GMT+01:00 nino martinez wael <nino.martinez.w...@gmail.com
> >:
>
> > Yes.. But would'nt CXF-DOSGI pull in it's on repo in the older version?
> We
> > are building an an offline karaf assembly.
> >
> > https://github.com/apache/cxf-dosgi/blob/master/
> distribution/features/src/
> > main/resources/features.xml
> > Line 3?
> >
> > -regards Nino
> >
> > On Wed, Nov 8, 2017 at 5:25 PM, Christian Schneider <
> > ch...@die-schneider.net
> > > wrote:
> >
> > > Do you use CXF-DOSGi with Karaf?
> > > If yes then you can simply add the cxf repository in version 3.2.1 in
> > > addition to cxf-dosgi. Karaf should then use the newer cxf.
> > >
> > > Christian
> > >
> > > 2017-11-08 9:27 GMT+01:00 nino martinez wael <
> > nino.martinez.w...@gmail.com
> > > >:
> > >
> > > > Hi
> > > >
> > > > Could we get an new release that depends on CXF 3.2.1..
> > > >
> > > > It has an crucial update regarding swagger..
> > > >
> > > > --
> > > > Best regards / Med venlig hilsen
> > > > Nino Martinez
> > > >
> > >
> > >
> > >
> > > --
> > > --
> > > Christian Schneider
> > > http://www.liquid-reality.de
> > > <https://owa.talend.com/owa/redir.aspx?C=
> 3aa4083e0c744ae1ba52bd062c5a7e
> > > 46=http%3a%2f%2fwww.liquid-reality.de>
> > >
> > > Computer Scientist
> > > http://www.adobe.com
> > >
> >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46=http%3a%2f%2fwww.liquid-reality.de>
>
> Computer Scientist
> http://www.adobe.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: CXF DOSGI

2017-11-09 Thread nino martinez wael
Yes.. But would'nt CXF-DOSGI pull in it's on repo in the older version? We
are building an an offline karaf assembly.

https://github.com/apache/cxf-dosgi/blob/master/distribution/features/src/main/resources/features.xml
Line 3?

-regards Nino

On Wed, Nov 8, 2017 at 5:25 PM, Christian Schneider <ch...@die-schneider.net
> wrote:

> Do you use CXF-DOSGi with Karaf?
> If yes then you can simply add the cxf repository in version 3.2.1 in
> addition to cxf-dosgi. Karaf should then use the newer cxf.
>
> Christian
>
> 2017-11-08 9:27 GMT+01:00 nino martinez wael <nino.martinez.w...@gmail.com
> >:
>
> > Hi
> >
> > Could we get an new release that depends on CXF 3.2.1..
> >
> > It has an crucial update regarding swagger..
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46=http%3a%2f%2fwww.liquid-reality.de>
>
> Computer Scientist
> http://www.adobe.com
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


CXF DOSGI

2017-11-08 Thread nino martinez wael
Hi

Could we get an new release that depends on CXF 3.2.1..

It has an crucial update regarding swagger..

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-26 Thread nino martinez wael
Hi Sergey

I just reforked the master branch (after commit
3b4ed05b1217040ead101fb14c0441d41241f32d ), apparently I failed doing so..
I will try 3.1.14-SNAPSHOT instead..
On 26 Oct 2017 16:20, "Sergey Beryozkin" <sberyoz...@gmail.com> wrote:

> As I said, I've added a check there, try 3.1.14-SNAPSHOT
>
> Sergey
> On 26/10/17 13:09, nino martinez wael wrote:
>
>> okay, I have what are happening.. First call are spring that sets the
>> host property.. Immediately after this, the following happens:
>>
>> AbstractSwaggerFeature.initialize:67 are being called. which hits
>>
>>
>> Swagger2Feature.setBasePathByAddress:423 with the valuehttp://
>> 0.0.0.0:9000/swaggerSample  which causes it to reset the host to
>> http://0.0.0.0:9000...
>>
>>
>> SO
>>
>>
>> protected void setBasePathByAddress(String address) {
>>  if (!address.startsWith("/")) {
>>  URI u = URI.create(address);
>>  this.setBasePath(u.getPath());
>>  this.setHost(u.getPort() <0 ? u.getHost() : u.getHost() +":" +
>> u.getPort());
>>  }else {
>>  this.setBasePath(address);
>>  }
>>
>> }
>>
>> should be
>>
>>
>> protected void setBasePathByAddress(String address) {
>>  if (!address.startsWith("/") && host == null) {
>>  URI u = URI.create(address);
>>  this.setBasePath(u.getPath());
>>  this.setHost(u.getPort() <0 ? u.getHost() : u.getHost() +":" +
>> u.getPort());
>>  }else {
>>  this.setBasePath(address);
>>  }
>>
>> }
>>
>>
>> If somebody already set the host it should probably not be overwritten?
>> OR remove the setHost statement altogether?
>>
>>
>>
>>
>>
>>
>> On Thu, Oct 26, 2017 at 1:59 PM, nino martinez wael <
>> nino.martinez.w...@gmail.com <mailto:nino.martinez.w...@gmail.com>>
>> wrote:
>>
>> Hi again
>>
>> I've been stepping through the code, and something are definitely
>> wrong. All other properties set in the app context xml have been
>> processed and set in the swagger 2 feature and are acting logical..
>> BUT the HOST property are 0.0.0.0:9000 <http://0.0.0.0:9000> on
>> initialization.. Which seems strange, I'll debug some more and see
>> what are modifying the property..
>>
>> On Mon, Oct 23, 2017 at 11:56 AM, Sergey Beryozkin
>> <sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>> wrote:
>>
>> Thanks, sure, I've added a guard there to avoid auto-setting the
>> host value if it's not null, you can try 3.1.14-SNAPSHOT or
>> 3.2.1-SNAPSHOT now.
>> However, the question remains where '0.0.0.0' comes from in your
>> case, when no host is set, which is a typical scenario, and I
>> can see it is reported from URI.getHost().
>>
>> What address value do you see in
>> Swagger2Feature.setBasePathByAddress, before it tries to
>> auto-set the host ?
>>
>> Sergey
>>
>> On 23/10/17 05:47, nino martinez wael wrote:
>>
>> It enters the conditional statement (sethost have been
>> called). And address becomes
>> "http://0.0.0.0:9090/tdc/dialer/webservices/v1
>> <http://0.0.0.0:9090/tdc/dialer/webservices/v1>"
>>
>>
>>
>>
>> On Thu, Oct 12, 2017 at 3:51 PM, Sergey Beryozkin
>> <sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>
>> <mailto:sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>>>
>> wrote:
>>
>>  Hmm... I may've been wrong with some of the assumptions
>> about what
>>  Swagger2Feature does.
>>
>>  Can you please do a breakpoint at
>>
>> https://github.com/apache/cxf/blob/cxf-3.1.12/rt/rs/descript
>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Abstr
>> actSwaggerFeature.java#L103
>> <https://github.com/apache/cxf/blob/cxf-3.1.12/rt/rs/descrip
>> tion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Abst
>> ractSwaggerFeature.java#L103>
>> <https://github.com/apache/cxf
>> /blob/cxf-3.1.12/rt/rs/description-swagger/src/main/java/org
>> /apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java#L103
&g

Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-26 Thread nino martinez wael
Hi again

I've been stepping through the code, and something are definitely wrong.
All other properties set in the app context xml have been processed and set
in the swagger 2 feature and are acting logical.. BUT the HOST property are
0.0.0.0:9000 on initialization.. Which seems strange, I'll debug some more
and see what are modifying the property..

On Mon, Oct 23, 2017 at 11:56 AM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Thanks, sure, I've added a guard there to avoid auto-setting the host
> value if it's not null, you can try 3.1.14-SNAPSHOT or 3.2.1-SNAPSHOT now.
> However, the question remains where '0.0.0.0' comes from in your case,
> when no host is set, which is a typical scenario, and I can see it is
> reported from URI.getHost().
>
> What address value do you see in Swagger2Feature.setBasePathByAddress,
> before it tries to auto-set the host ?
>
> Sergey
>
> On 23/10/17 05:47, nino martinez wael wrote:
>
>> It enters the conditional statement (sethost have been called). And
>> address becomes "http://0.0.0.0:9090/tdc/dialer/webservices/v1;
>>
>>
>>
>>
>> On Thu, Oct 12, 2017 at 3:51 PM, Sergey Beryozkin <sberyoz...@gmail.com
>> <mailto:sberyoz...@gmail.com>> wrote:
>>
>> Hmm... I may've been wrong with some of the assumptions about what
>> Swagger2Feature does.
>>
>> Can you please do a breakpoint at
>>
>> https://github.com/apache/cxf/blob/cxf-3.1.12/rt/rs/descript
>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Abstr
>> actSwaggerFeature.java#L103
>> <https://github.com/apache/cxf/blob/cxf-3.1.12/rt/rs/descrip
>> tion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/A
>> bstractSwaggerFeature.java#L103>
>>
>> and see what happens, without even doing setHost().
>>
>> I won't have time for a while to investigate it. But I'll take care
>> of adding a test for checking that setHost() works later on
>>
>> Cheers, Sergey
>>
>> On 12/10/17 13:42, nino martinez wael wrote:
>>
>> Sure, I've made the changes to the cxf spring boot sample:
>>
>> https://github.com/nmwael/cxf/commit/86630259982786f013faad6
>> 58e84bd27bca368b7
>> <https://github.com/nmwael/cxf/commit/86630259982786f013faad
>> 658e84bd27bca368b7>
>>
>>
>> The resulting swagger.json does not honor the host property,
>> host remains the same no matter what:
>>
>> "host":"0.0.0.0:9000 <http://0.0.0.0:9000> <http://0.0.0.0:9000>"
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Oct 12, 2017 at 1:32 PM, Sergey Beryozkin
>> <sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>
>> <mailto:sberyoz...@gmail.com <mailto:sberyoz...@gmail.com>>>
>> wrote:
>>
>>      Hi
>>
>>  CXF does not contribute itself to the generation of 'host'
>> within
>>  the Swagger JSON. For example, try a jaxrs/spring-boot
>> demo, or some
>>  of other swagger2 demos...
>>
>>  If you'd like you can get the CXF source, and step through
>> the CXF
>>  Swagger2Feature
>>
>>  Sergey
>>
>>  On 12/10/17 11:06, nino martinez wael wrote:
>>
>>  Hi Sergey,
>>
>>  I've tried this:
>>
>>  Swagger2Feature swagger =new Swagger2Feature();
>>
>>  swagger.setHost("127.0.0.1:9090 <http://127.0.0.1:9090>
>> <http://127.0.0.1:9090>
>>  <http://127.0.0.1:9090>");
>>
>>  swagger.setUsePathBasedConfig(true);
>>
>>
>>  BUT the swagger json still states:
>>
>>
>> 0.0.0.0:9090 <http://0.0.0.0:9090> <http://0.0.0.0:9090>
>> <http://0.0.0.0:9090>
>>
>>
>>  As far as I can see it is something CXF generates.. I
>> cant
>>  really pinpoint where CXF grabs the configuration from,
>> but if I
>>  change
>>
>>  swagger.setLicense("Commercial DOES THIS APPLY?");
>>
>>
>>  It does apply in the swagger json and I am able to
>> change that
>>  part, it is as CXF ignores the swagger.getHOST method...
>>
>>
>>
>>  

Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-11 Thread nino martinez wael
No problem, I tried both configurations but no matter what I do, the host
remains the same 0.0.0.0:9090

On 11 Oct 2017 15:51, "Sergey Beryozkin" <sberyoz...@gmail.com> wrote:

Sorry, I accidentally moved it from the users list,


On 11/10/17 14:42, nino martinez wael wrote:

> Sure, in my example you can see that host 0.0.0.0:9090 <
> http://0.0.0.0:9090> have been generated.. However calling
>
> http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns <
> http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns>
>
>
>
> Will never work.. It has to be an IP or dns name.. 0.0.0.0 is not valid..
>

CXF Swagger2Feature is definitely not involved into generating a host
value, but it has a 'host' property which if set is passed to Swagger.

May be alternative option is to set a 'usePathBasedConfig' property - I
think this may actually work better

HTH, SErgey


>
> On Wed, Oct 11, 2017 at 3:19 PM, Sergey Beryozkin <sberyoz...@gmail.com
> <mailto:sberyoz...@gmail.com>> wrote:
>
> Can you please explain what is wrong with the returned fragment ?
>
> Sergey
>
> On 11/10/17 14:12, nino martinez wael wrote:
>
> Im not sure if I have explained myself correctly.. The problem
> is this:
>
> http://localhost:9090/tdc/dialer/webservices/v1/swagger.json#/
> <http://localhost:9090/tdc/dialer/webservices/v1/swagger.json#/>
>
> {
> "swagger" : "2.0",
> "info" : {
>   "description" : "Osgi Dialer Webservice",
>   "version" : "1.26.0.SNAPSHOT",
>   "title" : "Osgi Dialer Webservice",
>   "contact" : {
> "name" : "developm...@tdcnetdesign.dk
> <mailto:developm...@tdcnetdesign.dk>"
>
>   },
>   "license" : {
> "name" : "Commercial",
> "url" : "http://www.apache.org/licenses/LICENSE-2.0.html
> <http://www.apache.org/licenses/LICENSE-2.0.html>"
>   }
> },  "host" : "0.0.0.0:9090 <http://0.0.0.0:9090>",
>
> "basePath" : "/tdc/dialer/webservices/v1",
>     "tags" : [ {
>   "name" : "api-docs"
> }
>
>
> Swagger UI then generates requests like this:
>
> http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns
> <http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns>
>
>
> Which obviously fails.. How can I change this behaviour?
>
>
> On Tue, Oct 10, 2017 at 3:31 PM, nino martinez wael <
> nino.martinez.w...@gmail.com
> <mailto:nino.martinez.w...@gmail.com>> wrote:
>
> Hi
>
> I am running a dedicated CXF JAX RS on 0.0.0.0:9090
> <http://0.0.0.0:9090>
>
>
> the issue are that my swagger.json states that the host are
> 0.0.0.0:9090 <http://0.0.0.0:9090>
>
>
> I've tried to overwrite it using:
>
> Swagger2Feature swagger = new Swagger2Feature();
> swagger.setHost("127.0.0.1:9000 <http://127.0.0.1:9000>");
>
>
> But swagger.json remains unchanged. What am I missing?
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>
>
>
>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>


Re: Swagger2feature / 3.1.12 (DOSGI)

2017-10-11 Thread nino martinez wael
Im not sure if I have explained myself correctly.. The problem is this:

http://localhost:9090/tdc/dialer/webservices/v1/swagger.json#/

{
  "swagger" : "2.0",
  "info" : {
"description" : "Osgi Dialer Webservice",
"version" : "1.26.0.SNAPSHOT",
"title" : "Osgi Dialer Webservice",
"contact" : {
  "name" : "developm...@tdcnetdesign.dk"
},
"license" : {
  "name" : "Commercial",
  "url" : "http://www.apache.org/licenses/LICENSE-2.0.html;
}
  },  "host" : "0.0.0.0:9090",
  "basePath" : "/tdc/dialer/webservices/v1",
  "tags" : [ {
"name" : "api-docs"
  }


Swagger UI then generates requests like this:

http://0.0.0.0:9090/tdc/dialer/webservices/v1/fullcampaigns


Which obviously fails.. How can I change this behaviour?


On Tue, Oct 10, 2017 at 3:31 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Hi
>
> I am running a dedicated CXF JAX RS on 0.0.0.0:9090
>
> the issue are that my swagger.json states that the host are 0.0.0.0:9090
>
> I've tried to overwrite it using:
>
> Swagger2Feature swagger = new Swagger2Feature();
> swagger.setHost("127.0.0.1:9000");
>
> But swagger.json remains unchanged. What am I missing?
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Swagger2feature / 3.1.12 (DOSGI)

2017-10-10 Thread nino martinez wael
Hi

I am running a dedicated CXF JAX RS on 0.0.0.0:9090

the issue are that my swagger.json states that the host are 0.0.0.0:9090

I've tried to overwrite it using:

Swagger2Feature swagger = new Swagger2Feature();
swagger.setHost("127.0.0.1:9000");

But swagger.json remains unchanged. What am I missing?


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI 2 prefered documentation technique?

2017-06-26 Thread nino martinez wael
I got it working, it was because of the old cxf core version...

Thanks for the help :)

On Thu, Jun 22, 2017 at 2:10 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> May be it is installed after the checks are done ?
>
>
> On 22/06/17 13:08, nino martinez wael wrote:
>
>> I've put this in my feature file: 
>> wrap:mvn:org.webjars/swagger-ui/2.2.10
>>
>> On Thu, Jun 22, 2017 at 2:07 PM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> Sorry I was wrong it is 3.1.11..
>>>
>>> On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sberyoz...@gmail.com>
>>> wrote:
>>>
>>> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>>>>
>>>> Sergey
>>>>
>>>> On 21/06/17 14:37, nino martinez wael wrote:
>>>>
>>>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of
>>>>> the
>>>>> swagger cxf module.. would that be a problme?
>>>>>
>>>>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>
>>>>> SwaggerUIVersion ends up being null. It goes through all the checks..
>>>>> Do
>>>>>
>>>>>> I
>>>>>> need to declare that version somewhere?
>>>>>>
>>>>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>>
>>>>>> Yes I will try so.. ASAP..
>>>>>>
>>>>>>>
>>>>>>> -Thanks
>>>>>>>
>>>>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>>>>> sberyoz...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>>>
>>>>>>>> Can you put a breakpoint here:
>>>>>>>>
>>>>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>>>>> waggerUiResolver.java#L38
>>>>>>>>
>>>>>>>> Cheers, Sergey
>>>>>>>>
>>>>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> I think I need both..
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>>>>> host
>>>>>>>>> our DOSGI service on another port, and the only way to get SWAGGER
>>>>>>>>> ui to
>>>>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>>>>
>>>>>>>>> Did you try with an older release of swagger..? I just dont know
>>>>>>>>> what I
>>>>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>>>>> swagger-ui
>>>>>>>>> activation as far as I can see, combined with
>>>>>>>>> supportSwaggerUi=true..
>>>>>>>>> But
>>>>>>>>> nothing shows up at my version of "http://host:port/context/serv
>>>>>>>>> ices/
>>>>>>>>> api-docs?/url=/swagger.json"..
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Place I've looked:
>>>>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>>>>> ch...@die-schneider.net> wrote:
>>>>>>>>>
>>>>>>>>> I worked on a better swagger integration a while ago but also
>>>>>>>>> failed
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> the
>>>>>>>>>> UI. At that time I think it was an incompatibility of the cxf
>>

Re: DOSGI 2 prefered documentation technique?

2017-06-22 Thread nino martinez wael
I've put this in my feature file: 
wrap:mvn:org.webjars/swagger-ui/2.2.10

On Thu, Jun 22, 2017 at 2:07 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Sorry I was wrong it is 3.1.11..
>
> On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>>
>> Sergey
>>
>> On 21/06/17 14:37, nino martinez wael wrote:
>>
>>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
>>> swagger cxf module.. would that be a problme?
>>>
>>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do
>>>> I
>>>> need to declare that version somewhere?
>>>>
>>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> Yes I will try so.. ASAP..
>>>>>
>>>>> -Thanks
>>>>>
>>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>>> sberyoz...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi
>>>>>>
>>>>>> Can you put a breakpoint here:
>>>>>>
>>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>>> waggerUiResolver.java#L38
>>>>>>
>>>>>> Cheers, Sergey
>>>>>>
>>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>>
>>>>>> I think I need both..
>>>>>>>
>>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>>> host
>>>>>>> our DOSGI service on another port, and the only way to get SWAGGER
>>>>>>> ui to
>>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>>
>>>>>>> Did you try with an older release of swagger..? I just dont know
>>>>>>> what I
>>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>>> swagger-ui
>>>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>>>> But
>>>>>>> nothing shows up at my version of "http://host:port/context/serv
>>>>>>> ices/
>>>>>>> api-docs?/url=/swagger.json"..
>>>>>>>
>>>>>>>
>>>>>>> Place I've looked:
>>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>>> ch...@die-schneider.net> wrote:
>>>>>>>
>>>>>>> I worked on a better swagger integration a while ago but also failed
>>>>>>> at
>>>>>>>
>>>>>>>> the
>>>>>>>> UI. At that time I think it was an incompatibility of the cxf
>>>>>>>> swagger
>>>>>>>> support with the new swagger versions.
>>>>>>>> There are some interesting enhancements in the current DOSGi master
>>>>>>>> so
>>>>>>>> we
>>>>>>>> could do a release soon.
>>>>>>>> It would be great to also include swagger support but I would also
>>>>>>>> not
>>>>>>>> mind
>>>>>>>> to move swagger support to 2.3.0.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>>> nino.martinez.w...@gmail.com>
>>>>>>>> :
>>>>>>>>
>>>>>>>> Hi Christian,
>>>>>>>>
>>>>>>>>>
>>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>&

Re: DOSGI 2 prefered documentation technique?

2017-06-22 Thread nino martinez wael
Sorry I was wrong it is 3.1.11..

On Wed, Jun 21, 2017 at 4:38 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> It needs to be CXF 3.1.11 - it is used with the latest DOSGi2 release
>
> Sergey
>
> On 21/06/17 14:37, nino martinez wael wrote:
>
>> IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
>> swagger cxf module.. would that be a problme?
>>
>> On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
>>> need to declare that version somewhere?
>>>
>>> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> Yes I will try so.. ASAP..
>>>>
>>>> -Thanks
>>>>
>>>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <
>>>> sberyoz...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi
>>>>>
>>>>> Can you put a breakpoint here:
>>>>>
>>>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>>>> waggerUiResolver.java#L38
>>>>>
>>>>> Cheers, Sergey
>>>>>
>>>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>>>
>>>>> I think I need both..
>>>>>>
>>>>>> Problem are that I run into the CORS problem since we have begun to
>>>>>> host
>>>>>> our DOSGI service on another port, and the only way to get SWAGGER ui
>>>>>> to
>>>>>> function correctly would be to host it alongside the webservice..
>>>>>>
>>>>>> Did you try with an older release of swagger..? I just dont know what
>>>>>> I
>>>>>> need to add for CXF to activate swager ui, I've put in
>>>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger
>>>>>> swagger-ui
>>>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>>>> But
>>>>>> nothing shows up at my version of "http://host:port/context/services/
>>>>>> api-docs?/url=/swagger.json"..
>>>>>>
>>>>>>
>>>>>> Place I've looked:
>>>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>>>> ch...@die-schneider.net> wrote:
>>>>>>
>>>>>> I worked on a better swagger integration a while ago but also failed
>>>>>> at
>>>>>>
>>>>>>> the
>>>>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>>>>> support with the new swagger versions.
>>>>>>> There are some interesting enhancements in the current DOSGi master
>>>>>>> so
>>>>>>> we
>>>>>>> could do a release soon.
>>>>>>> It would be great to also include swagger support but I would also
>>>>>>> not
>>>>>>> mind
>>>>>>> to move swagger support to 2.3.0.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>>>> nino.martinez.w...@gmail.com>
>>>>>>> :
>>>>>>>
>>>>>>> Hi Christian,
>>>>>>>
>>>>>>>>
>>>>>>>> I seem to remember that I can get the SWAGGER UI bundled together
>>>>>>>> with
>>>>>>>>
>>>>>>>> the
>>>>>>>
>>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>>>
>>>>>>>> api-docs
>>>>>>>
>>>>>>> to my resource url. But it isnt working.
>>>>>>>>
>>>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>>>> swagger
>>>>>>>> ui document.
>>>>>>>>
>>>>>&g

Re: DOSGI 2 prefered documentation technique?

2017-06-21 Thread nino martinez wael
IT does look like the project are using CXF-core 3.0.2 , but 3.1.9 of the
swagger cxf module.. would that be a problme?

On Wed, Jun 21, 2017 at 3:35 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
> need to declare that version somewhere?
>
> On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> Yes I will try so.. ASAP..
>>
>> -Thanks
>>
>> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sberyoz...@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> Can you put a breakpoint here:
>>>
>>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>>> waggerUiResolver.java#L38
>>>
>>> Cheers, Sergey
>>>
>>> On 16/06/17 07:13, nino martinez wael wrote:
>>>
>>>> I think I need both..
>>>>
>>>> Problem are that I run into the CORS problem since we have begun to host
>>>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>>>> function correctly would be to host it alongside the webservice..
>>>>
>>>> Did you try with an older release of swagger..? I just dont know what I
>>>> need to add for CXF to activate swager ui, I've put in
>>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>>>> activation as far as I can see, combined with supportSwaggerUi=true..
>>>> But
>>>> nothing shows up at my version of "http://host:port/context/services/
>>>> api-docs?/url=/swagger.json"..
>>>>
>>>>
>>>> Place I've looked:
>>>> http://cxf.apache.org/docs/swagger2feature.html
>>>>
>>>>
>>>>
>>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>>> ch...@die-schneider.net> wrote:
>>>>
>>>> I worked on a better swagger integration a while ago but also failed at
>>>>> the
>>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>>> support with the new swagger versions.
>>>>> There are some interesting enhancements in the current DOSGi master so
>>>>> we
>>>>> could do a release soon.
>>>>> It would be great to also include swagger support but I would also not
>>>>> mind
>>>>> to move swagger support to 2.3.0.
>>>>>
>>>>> Christian
>>>>>
>>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>>> nino.martinez.w...@gmail.com>
>>>>> :
>>>>>
>>>>> Hi Christian,
>>>>>>
>>>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>>>
>>>>> the
>>>>>
>>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>>
>>>>> api-docs
>>>>>
>>>>>> to my resource url. But it isnt working.
>>>>>>
>>>>>> My swagger.json are generated correctly..But does not link to the
>>>>>> swagger
>>>>>> ui document.
>>>>>>
>>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>>
>>>>>>
>>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>>> sberyoz...@gmail.com
>>>>>>
>>>>>> wrote:
>>>>>>
>>>>>> According to
>>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>>
>>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>>
>>>>>>> Thanks, Sergey
>>>>>>>
>>>>>>>
>>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>>
>>>>>>> I also had this problem but was not able to pin it down to the
>>>>>>>> missing
>>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>>
>>>>

Re: DOSGI 2 prefered documentation technique?

2017-06-21 Thread nino martinez wael
SwaggerUIVersion ends up being null. It goes through all the checks.. Do I
need to declare that version somewhere?

On Wed, Jun 21, 2017 at 3:18 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Yes I will try so.. ASAP..
>
> -Thanks
>
> On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> Hi
>>
>> Can you put a breakpoint here:
>>
>> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
>> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiS
>> waggerUiResolver.java#L38
>>
>> Cheers, Sergey
>>
>> On 16/06/17 07:13, nino martinez wael wrote:
>>
>>> I think I need both..
>>>
>>> Problem are that I run into the CORS problem since we have begun to host
>>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>>> function correctly would be to host it alongside the webservice..
>>>
>>> Did you try with an older release of swagger..? I just dont know what I
>>> need to add for CXF to activate swager ui, I've put in
>>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>>> activation as far as I can see, combined with supportSwaggerUi=true.. But
>>> nothing shows up at my version of "http://host:port/context/services/
>>> api-docs?/url=/swagger.json"..
>>>
>>>
>>> Place I've looked:
>>> http://cxf.apache.org/docs/swagger2feature.html
>>>
>>>
>>>
>>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>>> ch...@die-schneider.net> wrote:
>>>
>>> I worked on a better swagger integration a while ago but also failed at
>>>> the
>>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>>> support with the new swagger versions.
>>>> There are some interesting enhancements in the current DOSGi master so
>>>> we
>>>> could do a release soon.
>>>> It would be great to also include swagger support but I would also not
>>>> mind
>>>> to move swagger support to 2.3.0.
>>>>
>>>> Christian
>>>>
>>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>>> nino.martinez.w...@gmail.com>
>>>> :
>>>>
>>>> Hi Christian,
>>>>>
>>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>>
>>>> the
>>>>
>>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>>
>>>> api-docs
>>>>
>>>>> to my resource url. But it isnt working.
>>>>>
>>>>> My swagger.json are generated correctly..But does not link to the
>>>>> swagger
>>>>> ui document.
>>>>>
>>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>>
>>>>>
>>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>>> sberyoz...@gmail.com
>>>>>
>>>>> wrote:
>>>>>
>>>>> According to
>>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>>
>>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>>> keep working with Swagger 2 UI for the moment
>>>>>>
>>>>>> Thanks, Sergey
>>>>>>
>>>>>>
>>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>>
>>>>>> I also had this problem but was not able to pin it down to the missing
>>>>>>> host. ( I am not very familiar with swagger).
>>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>>
>>>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>>>>>>>
>>>>>> you
>>>>
>>>>> can also create a PR in cxf to fix the issue.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <ivo.lei...@gmail.com>:
>>>>>>>
>>>>>>> Hi sorry to resurrect this thread but I've a similar problem which
>>>>>>> was
>>>>>>>
>>>>>> not
>>>>>
>>>>>> completely solved with thi

Re: DOSGI 2 prefered documentation technique?

2017-06-21 Thread nino martinez wael
Yes I will try so.. ASAP..

-Thanks

On Fri, Jun 16, 2017 at 10:38 AM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Hi
>
> Can you put a breakpoint here:
>
> https://github.com/apache/cxf/blob/cxf-3.1.11/rt/rs/descript
> ion-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/
> OsgiSwaggerUiResolver.java#L38
>
> Cheers, Sergey
>
> On 16/06/17 07:13, nino martinez wael wrote:
>
>> I think I need both..
>>
>> Problem are that I run into the CORS problem since we have begun to host
>> our DOSGI service on another port, and the only way to get SWAGGER ui to
>> function correctly would be to host it alongside the webservice..
>>
>> Did you try with an older release of swagger..? I just dont know what I
>> need to add for CXF to activate swager ui, I've put in
>> wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
>> activation as far as I can see, combined with supportSwaggerUi=true.. But
>> nothing shows up at my version of "http://host:port/context/services/
>> api-docs?/url=/swagger.json"..
>>
>>
>> Place I've looked:
>> http://cxf.apache.org/docs/swagger2feature.html
>>
>>
>>
>> On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
>> ch...@die-schneider.net> wrote:
>>
>> I worked on a better swagger integration a while ago but also failed at
>>> the
>>> UI. At that time I think it was an incompatibility of the cxf swagger
>>> support with the new swagger versions.
>>> There are some interesting enhancements in the current DOSGi master so we
>>> could do a release soon.
>>> It would be great to also include swagger support but I would also not
>>> mind
>>> to move swagger support to 2.3.0.
>>>
>>> Christian
>>>
>>> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
>>> nino.martinez.w...@gmail.com>
>>> :
>>>
>>> Hi Christian,
>>>>
>>>> I seem to remember that I can get the SWAGGER UI bundled together with
>>>>
>>> the
>>>
>>>> DOSGI app. But cannot remember the url I have tried with appending
>>>>
>>> api-docs
>>>
>>>> to my resource url. But it isnt working.
>>>>
>>>> My swagger.json are generated correctly..But does not link to the
>>>> swagger
>>>> ui document.
>>>>
>>>> BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
>>>>
>>>>
>>>> On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <
>>>> sberyoz...@gmail.com
>>>>
>>>> wrote:
>>>>
>>>> According to
>>>>> https://issues.apache.org/jira/browse/CXF-7347
>>>>>
>>>>> it is a SwaggerUI 3 refactoring related issue...
>>>>> keep working with Swagger 2 UI for the moment
>>>>>
>>>>> Thanks, Sergey
>>>>>
>>>>>
>>>>> On 24/04/17 05:52, Christian Schneider wrote:
>>>>>
>>>>> I also had this problem but was not able to pin it down to the missing
>>>>>> host. ( I am not very familiar with swagger).
>>>>>> Based on your findings I hope e can find a good solution to this.
>>>>>>
>>>>>> Can you post your code for the CustomSwagger2Serializers. If you wat
>>>>>>
>>>>> you
>>>
>>>> can also create a PR in cxf to fix the issue.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <ivo.lei...@gmail.com>:
>>>>>>
>>>>>> Hi sorry to resurrect this thread but I've a similar problem which was
>>>>>>
>>>>> not
>>>>
>>>>> completely solved with this approach,
>>>>>>>
>>>>>>> First I've managed to make dosgi work with swagger with a:
>>>>>>>
>>>>>>>  setScan(false);
>>>>>>>  setUsePathBasedConfig(true);
>>>>>>>
>>>>>>> in the swagger feature. It all works well except the "Try it out" of
>>>>>>>
>>>>>> the
>>>>
>>>>> swagger ui. I'm using the latest version
>>>>>>>
>>>>>> (mvn:org.webjars/swagger-ui/3.
>>>
>>>> 0.5)
>>>>>>

Re: DOSGI 2 prefered documentation technique?

2017-06-16 Thread nino martinez wael
I think I need both..

Problem are that I run into the CORS problem since we have begun to host
our DOSGI service on another port, and the only way to get SWAGGER ui to
function correctly would be to host it alongside the webservice..

Did you try with an older release of swagger..? I just dont know what I
need to add for CXF to activate swager ui, I've put in
wrap:mvn:org.webjars/swagger-ui/2.2.10 which should trigger swagger-ui
activation as far as I can see, combined with supportSwaggerUi=true.. But
nothing shows up at my version of "http://host:port/context/services/
api-docs?/url=/swagger.json"..


Place I've looked:
http://cxf.apache.org/docs/swagger2feature.html



On Wed, Jun 14, 2017 at 9:02 PM, Christian Schneider <
ch...@die-schneider.net> wrote:

> I worked on a better swagger integration a while ago but also failed at the
> UI. At that time I think it was an incompatibility of the cxf swagger
> support with the new swagger versions.
> There are some interesting enhancements in the current DOSGi master so we
> could do a release soon.
> It would be great to also include swagger support but I would also not mind
> to move swagger support to 2.3.0.
>
> Christian
>
> 2017-06-14 14:58 GMT+02:00 nino martinez wael <
> nino.martinez.w...@gmail.com>
> :
>
> > Hi Christian,
> >
> > I seem to remember that I can get the SWAGGER UI bundled together with
> the
> > DOSGI app. But cannot remember the url I have tried with appending
> api-docs
> > to my resource url. But it isnt working.
> >
> > My swagger.json are generated correctly..But does not link to the swagger
> > ui document.
> >
> > BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?
> >
> >
> > On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin <sberyoz...@gmail.com
> >
> > wrote:
> >
> > > According to
> > > https://issues.apache.org/jira/browse/CXF-7347
> > >
> > > it is a SwaggerUI 3 refactoring related issue...
> > > keep working with Swagger 2 UI for the moment
> > >
> > > Thanks, Sergey
> > >
> > >
> > > On 24/04/17 05:52, Christian Schneider wrote:
> > >
> > >> I also had this problem but was not able to pin it down to the missing
> > >> host. ( I am not very familiar with swagger).
> > >> Based on your findings I hope e can find a good solution to this.
> > >>
> > >> Can you post your code for the CustomSwagger2Serializers. If you wat
> you
> > >> can also create a PR in cxf to fix the issue.
> > >>
> > >> Christian
> > >>
> > >> 2017-04-23 23:49 GMT+02:00 Ivo Leitão <ivo.lei...@gmail.com>:
> > >>
> > >> Hi sorry to resurrect this thread but I've a similar problem which was
> > not
> > >>> completely solved with this approach,
> > >>>
> > >>> First I've managed to make dosgi work with swagger with a:
> > >>>
> > >>> setScan(false);
> > >>> setUsePathBasedConfig(true);
> > >>>
> > >>> in the swagger feature. It all works well except the "Try it out" of
> > the
> > >>> swagger ui. I'm using the latest version
> (mvn:org.webjars/swagger-ui/3.
> > >>> 0.5)
> > >>> and I've noticed that in the swagger.json the host is not filled.
> This
> > >>> host
> > >>> is used to build the url. The cxf feature does not set the host no
> > matter
> > >>> what I do or change.
> > >>>
> > >>> I ended up hammering an ugly solution by setting a custom swagger2
> > >>> serializer
> > >>>
> > >>> setSwagger2Serializers(new CustomSwagger2Serializers());
> > >>>
> > >>> where I'm able to extract the servlet request thus setting the
> > host:port
> > >>>
> > >>> I'm I missing something here or this is indeed a problema at least
> with
> > >>> the
> > >>> latest swagger ui version (It seems odd also that the swagger 2 ui
> does
> > >>> no
> > >>> use by default the current url but it didn't work in my tests) ?
> > >>>
> > >>> Tnks,
> > >>> Ivo Leitão
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context: http://cxf.547215.n5.nabble.
> > >>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
> > >>> Sent from the cxf-user mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>
> > >>
> > >>
> > >
> > > --
> > > Sergey Beryozkin
> > >
> > > Talend Community Coders
> > > http://coders.talend.com/
> > >
> >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46=http%3a%2f%2fwww.liquid-reality.de>
>
> Open Source Architect
> http://www.talend.com
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46=http%3a%2f%2fwww.talend.com>
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI 2 prefered documentation technique?

2017-06-14 Thread nino martinez wael
Hi Christian,

I seem to remember that I can get the SWAGGER UI bundled together with the
DOSGI app. But cannot remember the url I have tried with appending api-docs
to my resource url. But it isnt working.

My swagger.json are generated correctly..But does not link to the swagger
ui document.

BTW it does not work on 2.1.0.. Whats the horizon to release 2.2?


On Mon, Apr 24, 2017 at 11:23 AM, Sergey Beryozkin 
wrote:

> According to
> https://issues.apache.org/jira/browse/CXF-7347
>
> it is a SwaggerUI 3 refactoring related issue...
> keep working with Swagger 2 UI for the moment
>
> Thanks, Sergey
>
>
> On 24/04/17 05:52, Christian Schneider wrote:
>
>> I also had this problem but was not able to pin it down to the missing
>> host. ( I am not very familiar with swagger).
>> Based on your findings I hope e can find a good solution to this.
>>
>> Can you post your code for the CustomSwagger2Serializers. If you wat you
>> can also create a PR in cxf to fix the issue.
>>
>> Christian
>>
>> 2017-04-23 23:49 GMT+02:00 Ivo Leitão :
>>
>> Hi sorry to resurrect this thread but I've a similar problem which was not
>>> completely solved with this approach,
>>>
>>> First I've managed to make dosgi work with swagger with a:
>>>
>>> setScan(false);
>>> setUsePathBasedConfig(true);
>>>
>>> in the swagger feature. It all works well except the "Try it out" of the
>>> swagger ui. I'm using the latest version (mvn:org.webjars/swagger-ui/3.
>>> 0.5)
>>> and I've noticed that in the swagger.json the host is not filled. This
>>> host
>>> is used to build the url. The cxf feature does not set the host no matter
>>> what I do or change.
>>>
>>> I ended up hammering an ugly solution by setting a custom swagger2
>>> serializer
>>>
>>> setSwagger2Serializers(new CustomSwagger2Serializers());
>>>
>>> where I'm able to extract the servlet request thus setting the host:port
>>>
>>> I'm I missing something here or this is indeed a problema at least with
>>> the
>>> latest swagger ui version (It seems odd also that the swagger 2 ui does
>>> no
>>> use by default the current url but it didn't work in my tests) ?
>>>
>>> Tnks,
>>> Ivo Leitão
>>>
>>>
>>>
>>> --
>>> View this message in context: http://cxf.547215.n5.nabble.
>>> com/DOSGI-2-prefered-documentation-technique-tp5779291p5779847.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI 2 prefered documentation technique?

2017-04-09 Thread nino martinez wael
Ok great news. I have the enunciate version Working, with http service..

On 7 Apr 2017 18:07, "Christian Schneider" <ch...@die-schneider.net> wrote:

> It was not yet fully working like this. I got a swagger json but without
> any methods defined.
>
> With the help of sergey I found that I need to set @Api on the
> TaskResource interface.
> Then I get some better json.
>
> I am still not able to use the UI to call the methods but I hope I can
> also work this out.
>
> Christian
>
> On 07.04.2017 11:55, Christian Schneider wrote:
>
>> I think I got it working by changing the swagger feature to:
>>
>> Swagger2Feature swagger2Feature = new Swagger2Feature();
>> swagger2Feature.setBasePath("/cxf/tasks/");
>> swagger2Feature.setUsePathBasedConfig(true);
>> return Arrays.asList((Object)swagger2Feature);
>>
>> Basically I used the same config as in the jax_rs_description_swagger2_osgi
>> example.
>> Can you check if this works for you too?
>>
>> Christian
>>
>> On 07.04.2017 07:53, nino martinez wael wrote:
>>
>>> Christian, I have cloned dosgi, and added swagger to the jackson example
>>>
>>> https://github.com/nmwael/cxf-dosgi
>>> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest
>>> /impl-jackson
>>>
>>>
>>> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sberyoz...@gmail.com>
>>> wrote:
>>>
>>> I know disabling a scan did help some of my colleagues to make it work
>>>> OSGI...
>>>>
>>>> Sergey
>>>>
>>>> On 06/04/17 15:44, Sergey Beryozkin wrote:
>>>>
>>>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>>>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>>>>> Swagger2featire does in that demo, and I guess then compare to what is
>>>>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>>>>
>>>>> Cheers, Sergey
>>>>> On 06/04/17 15:05, nino martinez wael wrote:
>>>>>
>>>>> I will look into making a test project.
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>>
>>>>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>>>>
>>>>>>> swagger are not complaining, I have manually referred to the package
>>>>>>> for it
>>>>>>> to look.
>>>>>>>
>>>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>>>
>>>>>>> Let me just check.. I think I am using the wrong version of
>>>>>>> swagger..I
>>>>>>>
>>>>>>>> did a manual feature, for karaf... this feature should be used :
>>>>>>>> cxf-rs-description-swagger2
>>>>>>>>
>>>>>>>> Let me just verify..
>>>>>>>>
>>>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <
>>>>>>>> sberyoz...@gmail.com
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Yes, sometimes setScan(false) helps
>>>>>>>>
>>>>>>>>> Sergey
>>>>>>>>>
>>>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>>>>
>>>>>>>>> I am not very familiar with how Swagger works. Are you sure the
>>>>>>>>> scan
>>>>>>>>>
>>>>>>>>>> works like this in OSGi?
>>>>>>>>>>
>>>>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>>>>> willing to
>>>>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>>>>> would be
>>>>>>>>>> a great feature for remote services.
>>>>>>>>>>
>>>>>>>>>> Christian
>>>>>>>>>>
>>>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>&

Re: DOSGI 2 prefered documentation technique?

2017-04-07 Thread nino martinez wael
meanwhile I am pursuing to distribute my enunciate doc instead.. Using
httpservice..


On Fri, Apr 7, 2017 at 7:53 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Christian, I have cloned dosgi, and added swagger to the jackson example
>
> https://github.com/nmwael/cxf-dosgi
> https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest/impl-jackson
>
>
> On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sberyoz...@gmail.com>
> wrote:
>
>> I know disabling a scan did help some of my colleagues to make it work
>> OSGI...
>>
>> Sergey
>>
>> On 06/04/17 15:44, Sergey Beryozkin wrote:
>>
>>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>>> Swagger2featire does in that demo, and I guess then compare to what is
>>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>>
>>> Cheers, Sergey
>>> On 06/04/17 15:05, nino martinez wael wrote:
>>>
>>>> I will look into making a test project.
>>>>
>>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>>> swagger are not complaining, I have manually referred to the package
>>>>> for it
>>>>> to look.
>>>>>
>>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>>> nino.martinez.w...@gmail.com> wrote:
>>>>>
>>>>> Let me just check.. I think I am using the wrong version of swagger..I
>>>>>> did a manual feature, for karaf... this feature should be used :
>>>>>> cxf-rs-description-swagger2
>>>>>>
>>>>>> Let me just verify..
>>>>>>
>>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <
>>>>>> sberyoz...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> Yes, sometimes setScan(false) helps
>>>>>>>
>>>>>>> Sergey
>>>>>>>
>>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>>
>>>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>>>>> works like this in OSGi?
>>>>>>>>
>>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>>> willing to
>>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>>> would be
>>>>>>>> a great feature for remote services.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>>
>>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>>>> aware of
>>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>>> swagger
>>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>>
>>>>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>>>>> does
>>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>>
>>>>>>>>> @Component //
>>>>>>>>>  (
>>>>>>>>>  property =
>>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>>> //
>>>>>>>>>  )
>>>>>>>>> public class SwaggerIntent implements Callable<List> {
>>>>>>>>>
>>>>>>>>>  private String version = "";
>>>>>>>>>  private String name = "";
>>>>>>>>>
>>>>>>>>>  @Activate
>>>>>>>>>  public void activate(BundleContext bundleContext) {
>>>>>>>>>  Dictionary<String, String> headers =
>>>>>>>>> bundleContext.getBundle().getHeaders();
&g

Re: DOSGI 2 prefered documentation technique?

2017-04-06 Thread nino martinez wael
Christian, I have cloned dosgi, and added swagger to the jackson example

https://github.com/nmwael/cxf-dosgi
https://github.com/nmwael/cxf-dosgi/tree/master/samples/rest/impl-jackson


On Thu, Apr 6, 2017 at 4:46 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> I know disabling a scan did help some of my colleagues to make it work
> OSGI...
>
> Sergey
>
> On 06/04/17 15:44, Sergey Beryozkin wrote:
>
>> Hi, to be honest, I do not know if it is expected to work with DOSGi2,
>> have a look please at the 'plain' Swagger2 OSGI demo, and debug what
>> Swagger2featire does in that demo, and I guess then compare to what is
>> happening with DOSGI, I think it needs to be at least CXF 3.1.10
>>
>> Cheers, Sergey
>> On 06/04/17 15:05, nino martinez wael wrote:
>>
>>> I will look into making a test project.
>>>
>>> On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
>>> nino.martinez.w...@gmail.com> wrote:
>>>
>>> Nope did not fix it.. setScan(false) did not help.. And wondering why
>>>> swagger are not complaining, I have manually referred to the package
>>>> for it
>>>> to look.
>>>>
>>>> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
>>>> nino.martinez.w...@gmail.com> wrote:
>>>>
>>>> Let me just check.. I think I am using the wrong version of swagger..I
>>>>> did a manual feature, for karaf... this feature should be used :
>>>>> cxf-rs-description-swagger2
>>>>>
>>>>> Let me just verify..
>>>>>
>>>>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sberyoz...@gmail.com
>>>>> >
>>>>> wrote:
>>>>>
>>>>> Yes, sometimes setScan(false) helps
>>>>>>
>>>>>> Sergey
>>>>>>
>>>>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>>>>
>>>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>>>>> works like this in OSGi?
>>>>>>>
>>>>>>> Can you maybe put your test project into a github repo ? I am
>>>>>>> willing to
>>>>>>> invest a bit of time to help make this work as I think swagger
>>>>>>> would be
>>>>>>> a great feature for remote services.
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>>>>
>>>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>>>>> aware of
>>>>>>>> my endpoint.. However I have swagger ui running (although since
>>>>>>>> swagger
>>>>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>>>>
>>>>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>>>>> does
>>>>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>>>>
>>>>>>>> @Component //
>>>>>>>>  (
>>>>>>>>  property =
>>>>>>>> "org.apache.cxf.dosgi.IntentName=swagger"
>>>>>>>> //
>>>>>>>>  )
>>>>>>>> public class SwaggerIntent implements Callable<List> {
>>>>>>>>
>>>>>>>>  private String version = "";
>>>>>>>>  private String name = "";
>>>>>>>>
>>>>>>>>  @Activate
>>>>>>>>  public void activate(BundleContext bundleContext) {
>>>>>>>>  Dictionary<String, String> headers =
>>>>>>>> bundleContext.getBundle().getHeaders();
>>>>>>>>  version = headers.get("Bundle-Version");
>>>>>>>>  name = headers.get("Bundle-Name");
>>>>>>>>
>>>>>>>>
>>>>>>>>  }
>>>>>>>>
>>>>>>>>
>>>>>>>>  @Override
>>>>>>>>  public List call() throws Exception {
>>>>>>>>  Swagger2Feature swagger2Feature = new Swagger2

Re: DOSGI 2 prefered documentation technique?

2017-04-06 Thread nino martinez wael
I will look into making a test project.

On Thu, Apr 6, 2017 at 4:05 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> Nope did not fix it.. setScan(false) did not help.. And wondering why
> swagger are not complaining, I have manually referred to the package for it
> to look.
>
> On Thu, Apr 6, 2017 at 3:40 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> Let me just check.. I think I am using the wrong version of swagger..I
>> did a manual feature, for karaf... this feature should be used :
>> cxf-rs-description-swagger2
>>
>> Let me just verify..
>>
>> On Thu, Apr 6, 2017 at 3:34 PM, Sergey Beryozkin <sberyoz...@gmail.com>
>> wrote:
>>
>>> Yes, sometimes setScan(false) helps
>>>
>>> Sergey
>>>
>>> On 06/04/17 14:32, Christian Schneider wrote:
>>>
>>>> I am not very familiar with how Swagger works. Are you sure the scan
>>>> works like this in OSGi?
>>>>
>>>> Can you maybe put your test project into a github repo ? I am willing to
>>>> invest a bit of time to help make this work as I think swagger would be
>>>> a great feature for remote services.
>>>>
>>>> Christian
>>>>
>>>> On 06.04.2017 15:12, nino martinez wael wrote:
>>>>
>>>>> I've fiddled a lot, nothing seems to work in order to make swagger
>>>>> aware of
>>>>> my endpoint.. However I have swagger ui running (although since swagger
>>>>> cannot see my endpoints, it's somewhat empty)...
>>>>>
>>>>> RSA does pickup the swagger intent, and all are "working" except it
>>>>> does
>>>>> not see my endpoints. I get both swagger json and yaml.
>>>>>
>>>>> @Component //
>>>>>  (
>>>>>  property = "org.apache.cxf.dosgi.IntentName=swagger"
>>>>> //
>>>>>  )
>>>>> public class SwaggerIntent implements Callable<List> {
>>>>>
>>>>>  private String version = "";
>>>>>  private String name = "";
>>>>>
>>>>>  @Activate
>>>>>  public void activate(BundleContext bundleContext) {
>>>>>  Dictionary<String, String> headers =
>>>>> bundleContext.getBundle().getHeaders();
>>>>>  version = headers.get("Bundle-Version");
>>>>>  name = headers.get("Bundle-Name");
>>>>>
>>>>>
>>>>>  }
>>>>>
>>>>>
>>>>>  @Override
>>>>>  public List call() throws Exception {
>>>>>  Swagger2Feature swagger2Feature = new Swagger2Feature();
>>>>>  swagger2Feature.setBasePath("/cxf/dialer/v1/");
>>>>>  swagger2Feature.setTitle(name);
>>>>>  swagger2Feature.setDescription(name);
>>>>>  swagger2Feature.setLicense("Commercial");
>>>>>  swagger2Feature.setSupportSwaggerUi(true);
>>>>>  swagger2Feature.setContact("development@");
>>>>>  swagger2Feature.setScan(true);
>>>>>  swagger2Feature.setScanAllResources(true);
>>>>>  swagger2Feature.setUsePathBasedConfig(true);
>>>>>
>>>>>
>>>>>  swagger2Feature.setPrettyPrint(true);
>>>>>  swagger2Feature.setVersion(version);
>>>>>
>>>>>  return Arrays.asList((swagger2Feature));
>>>>>  }
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks for the mention about logger interceptors.
>>>>>
>>>>>
>>>>> On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider
>>>>> <ch...@die-schneider.net
>>>>>
>>>>>> wrote:
>>>>>> How do you export the swagger intent?
>>>>>>
>>>>>> Btw. The interceptors property will not work but you can add the
>>>>>> logging
>>>>>> Feature to the swagger intent service.
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>>
>>>&g

Re: DOSGI 2 prefered documentation technique?

2017-04-06 Thread nino martinez wael
I've fiddled a lot, nothing seems to work in order to make swagger aware of
my endpoint.. However I have swagger ui running (although since swagger
cannot see my endpoints, it's somewhat empty)...

RSA does pickup the swagger intent, and all are "working" except it does
not see my endpoints. I get both swagger json and yaml.

@Component //
(
property = "org.apache.cxf.dosgi.IntentName=swagger" //
)
public class SwaggerIntent implements Callable<List> {

private String version = "";
private String name = "";

@Activate
public void activate(BundleContext bundleContext) {
Dictionary<String, String> headers =
bundleContext.getBundle().getHeaders();
version = headers.get("Bundle-Version");
name = headers.get("Bundle-Name");


}


@Override
public List call() throws Exception {
Swagger2Feature swagger2Feature = new Swagger2Feature();
swagger2Feature.setBasePath("/cxf/dialer/v1/");
swagger2Feature.setTitle(name);
swagger2Feature.setDescription(name);
swagger2Feature.setLicense("Commercial");
swagger2Feature.setSupportSwaggerUi(true);
swagger2Feature.setContact("development@");
swagger2Feature.setScan(true);
swagger2Feature.setScanAllResources(true);
swagger2Feature.setUsePathBasedConfig(true);


swagger2Feature.setPrettyPrint(true);
swagger2Feature.setVersion(version);

return Arrays.asList((swagger2Feature));
}

}






Thanks for the mention about logger interceptors.


On Thu, Apr 6, 2017 at 1:50 PM, Christian Schneider <ch...@die-schneider.net
> wrote:

> How do you export the swagger intent?
>
> Btw. The interceptors property will not work but you can add the logging
> Feature to the swagger intent service.
>
> Christian
>
>
> On 06.04.2017 12:45, nino martinez wael wrote:
>
>> Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
>> them up..
>>
>> here a short sample:
>>
>> @Path("/")
>> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>> @Component(immediate = true, name = "SimpleEndPointsImpl", //
>>  property
>>  = //
>>  { //
>>  "service.exported.intents=swagger",
>>  "service.exported.interfaces=*",
>>  "service.exported.configs=org.apache.cxf.rs",
>>  "org.apache.cxf.rs.address=/dialer/v1/",
>>
>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>> r.LoggingInInterceptor",
>>
>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>> r.LoggingOutInterceptor"
>>  })
>> public class SimpleEndPointsImpl implements SimpleEndPoints {
>>
>>  private BusinessService businessService;
>>  private static org.slf4j.Logger logger =
>> LoggerFactory.getLogger(BackendDaoServiceUtil.class);
>>
>>  /**
>>   * @return Gives a full list of campaigns in the system
>>   */
>>  @Path("/fullcampaigns")
>>  @GET
>>  @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>>  @Override
>>  public List getAllCampaignsStatus() throws
>> CiscoAPIException, FailedSecurityException {
>>  return businessService.getFullCampaigns();
>>  }
>>
>>
>> On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
>> nino.martinez.w...@gmail.com> wrote:
>>
>> I will test it now..
>>>
>>>
>>> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
>>> ch...@die-schneider.net> wrote:
>>>
>>> The Swagger integration provides a feature. So adding this should be
>>>> quite similar to adding the Jackson provider.
>>>>
>>>> You create an intent service like this:
>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>> t/impl/JacksonIntent.java
>>>>
>>>> and add it to the service:
>>>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>>>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>>>> t/impl/TaskResourceImpl.java#L36
>>>>
>>>> Can you test this and give Feedback if it works.
>>>>
>>>> I also thought about supporting the @Features annotation on DOSGi
>

Re: DOSGI 2 prefered documentation technique?

2017-04-06 Thread nino martinez wael
Im having issue getting swagger to pickup my jaxrs endpoints... CXF picks
them up..

here a short sample:

@Path("/")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Component(immediate = true, name = "SimpleEndPointsImpl", //
property
= //
{ //
"service.exported.intents=swagger",
"service.exported.interfaces=*",
"service.exported.configs=org.apache.cxf.rs",
"org.apache.cxf.rs.address=/dialer/v1/",

"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingInInterceptor",

"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingOutInterceptor"
})
public class SimpleEndPointsImpl implements SimpleEndPoints {

private BusinessService businessService;
private static org.slf4j.Logger logger =
LoggerFactory.getLogger(BackendDaoServiceUtil.class);

/**
 * @return Gives a full list of campaigns in the system
 */
@Path("/fullcampaigns")
@GET
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Override
public List getAllCampaignsStatus() throws
CiscoAPIException, FailedSecurityException {
    return businessService.getFullCampaigns();
}


On Thu, Apr 6, 2017 at 9:54 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> I will test it now..
>
>
> On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <
> ch...@die-schneider.net> wrote:
>
>> The Swagger integration provides a feature. So adding this should be
>> quite similar to adding the Jackson provider.
>>
>> You create an intent service like this:
>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>> t/impl/JacksonIntent.java
>>
>> and add it to the service:
>> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
>> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/res
>> t/impl/TaskResourceImpl.java#L36
>>
>> Can you test this and give Feedback if it works.
>>
>> I also thought about supporting the @Features annotation on DOSGi
>> service  to provide a simple way to add features that do not need
>> additional config.
>>
>> Christian
>>
>> On 06.04.2017 08:04, nino martinez wael wrote:
>>
>>> Hi Guys
>>>
>>> I've been contemplating on documentation. Currently we've gone down the
>>> offline documentation road, using enunciate[1] while it feels okay I've
>>> seen that CXF supports other directions natively[2]. I am wondering if
>>> its
>>> possible to use those with DOSGI?
>>>
>>>
>>>
>>> [1]http://enunciate.webcohesion.com/
>>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>>
>>>
>>>
>>>
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI 2 prefered documentation technique?

2017-04-06 Thread nino martinez wael
I will test it now..


On Thu, Apr 6, 2017 at 9:09 AM, Christian Schneider <ch...@die-schneider.net
> wrote:

> The Swagger integration provides a feature. So adding this should be quite
> similar to adding the Jackson provider.
>
> You create an intent service like this:
> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/
> rest/impl/JacksonIntent.java
>
> and add it to the service:
> https://github.com/apache/cxf-dosgi/blob/master/samples/rest
> /impl-jackson/src/main/java/org/apache/cxf/dosgi/samples/
> rest/impl/TaskResourceImpl.java#L36
>
> Can you test this and give Feedback if it works.
>
> I also thought about supporting the @Features annotation on DOSGi service
> to provide a simple way to add features that do not need additional config.
>
> Christian
>
> On 06.04.2017 08:04, nino martinez wael wrote:
>
>> Hi Guys
>>
>> I've been contemplating on documentation. Currently we've gone down the
>> offline documentation road, using enunciate[1] while it feels okay I've
>> seen that CXF supports other directions natively[2]. I am wondering if its
>> possible to use those with DOSGI?
>>
>>
>>
>> [1]http://enunciate.webcohesion.com/
>> [2]http://cxf.apache.org/docs/swagger2feature.html
>>
>>
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI 2 prefered documentation technique?

2017-04-06 Thread nino martinez wael
Hi Guys

I've been contemplating on documentation. Currently we've gone down the
offline documentation road, using enunciate[1] while it feels okay I've
seen that CXF supports other directions natively[2]. I am wondering if its
possible to use those with DOSGI?



[1]http://enunciate.webcohesion.com/
[2]http://cxf.apache.org/docs/swagger2feature.html



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI 2, switching to jackson

2017-03-23 Thread nino martinez wael
Great guys.. Fast and faithful :)


thanks Nino

On Thu, Mar 23, 2017 at 4:44 PM, Christian Schneider <
ch...@die-schneider.net> wrote:

> Ah .. that was it. We need to set a bus property. The newest release
> cxf-dosgi 2.1.0 allows to do this.
> I think I will create a sample for this.
>
> Christian
>
>
> On 23.03.2017 15:53, Sergey Beryozkin wrote:
>
>> Hi
>>
>> The easiest way to deal with it is uninstall the jettison bundle.
>> A bus property "skip.default.json.provider.registration" is also
>> available where the CXF JAXRS provider factory will ignore even if it is
>> available on the classpath.
>>
>> As far as JAX-RS 2.0 selection of the providers is concerned it is
>> actually Jackson itself, due to its use of the wilcard Produces and
>> Consumes values which makes it difficult for it to be selected as the top
>> candidate if other JSON providers are loaded.
>>
>> Thanks, Sergey
>> On 23/03/17 11:28, Christian Schneider wrote:
>>
>>> You should be able to define the jackson provider as an intent.
>>> See:
>>> https://github.com/apache/cxf-dosgi/tree/master/common
>>>
>>> I remember though that I discussed this with Sergey recently and there
>>> might be some problem as the newest jax-rs spec makes it more difficult
>>> to override the default provider.
>>>
>>> @Sergey Do you remember what needs to be done for the override?
>>>
>>> Once we figure this out we should create a sample that shows how to use
>>> jackson as I think many people like to use it. If no one else is
>>> stepping up I will do this.
>>>
>>> Christian
>>>
>>> On 23.03.2017 12:05, nino martinez wael wrote:
>>>
>>>> Hi is it possible to use jackson with dosgi?
>>>>
>>>> We are using enaunciate to generate documentation and they only support
>>>> jackson.. Jettison evaluates or jaxb beans differently, making the doc
>>>> unusable...
>>>>
>>>>
>>>
>>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI 2, switching to jackson

2017-03-23 Thread nino martinez wael
Hi is it possible to use jackson with dosgi?

We are using enaunciate to generate documentation and they only support
jackson.. Jettison evaluates or jaxb beans differently, making the doc
unusable...

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI/CXF com.sun.xml.bind.v2.ContextFactory not found by org.apache.cxf.cxf-rt-transports-http [170]

2017-02-03 Thread nino martinez wael
You hit the spot again Christian. Thanks a lot. I no longer have a sword
hanging over my neck.

BUT, why does the karaf-maven-plugin(4.0.8) not include these per default?

I mean people do not have any chance of this when depending on the dosgi
feature (or did I miss something crucial?)..

regards Nino

On Fri, Feb 3, 2017 at 10:10 AM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> yes it is a "custom" distro, custom being it includes my feature.. Im not
> tying into anthing specific in my code in regards to contextfactory..
>
> my assembly def (I will add the libs you mentioned):
>
> 
> http://www.w3.org/2001/XMLSchema-instance; 
> xmlns="http://maven.apache.org/POM/4.0.0;
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> 
> osgi-dialer
> dk.netdesign.osgi-dialer
> 1.18-SNAPSHOT
> 
>
> dk.netdesign.osgi-dialer
> osgi-dialer-karaf-assembly
> 1.18-SNAPSHOT
> karaf-assembly
>
> osgi-dialer-karaf-assembly
>
> 
> UTF-8
> 
>
>
> 
> 
>
> org.apache.karaf.features
> framework
> ${karaf.version}
> compile
> kar
> 
> 
> org.apache.karaf.features
> framework
> features
> xml
> runtime
> ${karaf.version}
> 
> 
> org.apache.karaf.features
> standard
> features
> xml
> ${karaf.version}
> runtime
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> org.apache.karaf.features
> enterprise
> features
> xml
> runtime
> ${karaf.version}
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> osgi-dialer-karaf
> dk.netdesign.osgi-dialer
> features
> xml
> provided
> 1.18-SNAPSHOT
> 
>
>
> 
>
>
> 
> 
> 
> org.apache.maven.plugins
> maven-dependency-plugin
> 3.0.0
> 
>
> 
> 
> org.apache.karaf.tooling
> karaf-maven-plugin
> ${karaf.version}
> true
>
> 
> 
> true
> dialer-karaf
> 
> webconsole
> standard
> management
> config
> package
> kar
> ssh
> 
> 
> wrapper
> osgi-dialer
> 
> 
> 
> 
> 
> 
>
>
> On Fri, Feb 3, 2017 at 9:52 AM, Christian Schneider <
> ch...@die-schneider.net> wrote:
>
>> Oh .. do you create a custom karaf distro?
>>
>> In that case do not forget to add the libraries section:
>> https://github.com/apache/karaf/blob/master/assemblies/apach
>> e-karaf/pom.xml#L192-L209
>>
>> This installs the overrides for several of the jdk built in spec impls.
>> For newer jdks we could probably live without many of the overrides but we
>> did not yes adapt karaf and the features.
>>
>> Christian
>>
>>
>> On 03.02.2017 09:07, nino martinez wael wrote:
>>
>>> Hi Guys
>>>
>>> Im in quite a peril here.
>>>
>>> On in my pax exam test everythings fine. BUT after building my karaf
>>> assembly and moving to offline systems, this shows up:
>>> [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
>>> not
>>> found by org.apache.cxf.cxf-rt-transports-http [165]]
>>>
>>> Trying a manual approch, thinking that cxf-rt-transports-http had some
>>> dynamic import resolving to
>>>
>>> mvn:org.apache.servicemix.bundles/org.apache.service
>>> mix.bundles.jaxb-impl/2.2.11_1
>>>
>>> I then forced that bundle to be installed before touching DOSGI / CXF.
>>> It has made no change.
>>>
>>> Interestingly enough the only mentions for the servix mix bundle are
>>> these:
>>>
>>> Importing Bundles(on both working systems) org.apache.cxf.cxf-core
>>> (140) <http://localhost:8181/system/console/bundles/140>
>>> org.apache.servicemix.bundles.jaxb-xjc (201)
>>> <http://localhost:8181/system/console/bundles/201>
>>>
>>>
>>>
>>>
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI/CXF com.sun.xml.bind.v2.ContextFactory not found by org.apache.cxf.cxf-rt-transports-http [170]

2017-02-03 Thread nino martinez wael
yes it is a "custom" distro, custom being it includes my feature.. Im not
tying into anthing specific in my code in regards to contextfactory..

my assembly def (I will add the libs you mentioned):


http://www.w3.org/2001/XMLSchema-instance;
xmlns="http://maven.apache.org/POM/4.0.0;
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0

osgi-dialer
dk.netdesign.osgi-dialer
1.18-SNAPSHOT


dk.netdesign.osgi-dialer
osgi-dialer-karaf-assembly
1.18-SNAPSHOT
karaf-assembly

osgi-dialer-karaf-assembly


UTF-8






org.apache.karaf.features
framework
${karaf.version}
compile
kar


org.apache.karaf.features
framework
features
xml
runtime
${karaf.version}


org.apache.karaf.features
standard
features
xml
${karaf.version}
runtime










org.apache.karaf.features
enterprise
features
xml
runtime
${karaf.version}












osgi-dialer-karaf
dk.netdesign.osgi-dialer
features
xml
provided
1.18-SNAPSHOT









org.apache.maven.plugins
maven-dependency-plugin
3.0.0




org.apache.karaf.tooling
karaf-maven-plugin
${karaf.version}
true



true
dialer-karaf

webconsole
standard
management
config
package
kar
ssh


wrapper
osgi-dialer








On Fri, Feb 3, 2017 at 9:52 AM, Christian Schneider <ch...@die-schneider.net
> wrote:

> Oh .. do you create a custom karaf distro?
>
> In that case do not forget to add the libraries section:
> https://github.com/apache/karaf/blob/master/assemblies/apach
> e-karaf/pom.xml#L192-L209
>
> This installs the overrides for several of the jdk built in spec impls.
> For newer jdks we could probably live without many of the overrides but we
> did not yes adapt karaf and the features.
>
> Christian
>
>
> On 03.02.2017 09:07, nino martinez wael wrote:
>
>> Hi Guys
>>
>> Im in quite a peril here.
>>
>> On in my pax exam test everythings fine. BUT after building my karaf
>> assembly and moving to offline systems, this shows up:
>> [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory not
>> found by org.apache.cxf.cxf-rt-transports-http [165]]
>>
>> Trying a manual approch, thinking that cxf-rt-transports-http had some
>> dynamic import resolving to
>>
>> mvn:org.apache.servicemix.bundles/org.apache.service
>> mix.bundles.jaxb-impl/2.2.11_1
>>
>> I then forced that bundle to be installed before touching DOSGI / CXF.
>> It has made no change.
>>
>> Interestingly enough the only mentions for the servix mix bundle are
>> these:
>>
>> Importing Bundles(on both working systems) org.apache.cxf.cxf-core
>> (140) <http://localhost:8181/system/console/bundles/140>
>> org.apache.servicemix.bundles.jaxb-xjc (201)
>> <http://localhost:8181/system/console/bundles/201>
>>
>>
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI/CXF com.sun.xml.bind.v2.ContextFactory not found by org.apache.cxf.cxf-rt-transports-http [170]

2017-02-03 Thread nino martinez wael
Hi Guys

Im in quite a peril here.

On in my pax exam test everythings fine. BUT after building my karaf
assembly and moving to offline systems, this shows up:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory not
found by org.apache.cxf.cxf-rt-transports-http [165]]

Trying a manual approch, thinking that cxf-rt-transports-http had some
dynamic import resolving to

mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.11_1

I then forced that bundle to be installed before touching DOSGI / CXF.
It has made no change.

Interestingly enough the only mentions for the servix mix bundle are these:

Importing Bundles(on both working systems) org.apache.cxf.cxf-core
(140) 
org.apache.servicemix.bundles.jaxb-xjc (201)




-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: cxf-java2wadl-plugin not generating resource to grammar mapping

2017-01-23 Thread nino martinez wael
Yes I've made a typo :) I will try to set the property you mentioned to be
true..



On Mon, Jan 23, 2017 at 2:00 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Hi
>
> The format of the response is not FullCampaign but List of FullCampaign,
> which is, as far as XML is concerned is a problem.
> If you depend on a JAXB-to-JSON conversion then try setting a
>
> 'linkAnyMediaTypeToXmlSchema' property to true.
>
> Cheers, Sergey
>
>
> On 23/01/17 11:29, nino martinez wael wrote:
>
>> Hi I've just run cxf-java2wadl-plugin on my project the resulting wadl
>> looks like this:
>>
>> http://wadl.dev.java.net/2009/02; xmlns:xs="
>> http://www.w3.org/2001/XMLSchema;>
>> 
>> 
>> > id="dk.netdesign.osgidialer.osgi.dialer.webservice.spec.SimpleEndPoints">
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>  (snip stop)
>> JAVA Rest endpoint:
>> public interface SimpleEndPoints {
>>
>> @Path("/campaigns")
>> @GET
>> @Produces(value = MediaType.APPLICATION_JSON)
>> public List GetAllCampaignsStatus();
>>
>>
>> Now I would have expected that the WADL would look something like this:
>>
>> http://wadl.dev.java.net/2009/02;
>> xmlns:xs="http://www.w3.org/2001/XMLSchema;>
>> 
>>   ...JAXB representation of FullCampaign..
>> 
>> 
>> > id="dk.netdesign.osgidialer.osgi.dialer.webservice.spec.SimpleEndPoints">
>> 
>> > id="GetAllCampaignsStatus">
>> 
>> > type="xc:FullCampaign" mediaType="application/json"/>
>> 
>> 
>> 
>>  (snip stop)
>>
>> Just like the example on w3c: https://www.w3.org/Submission/
>> wadl/#x3-34000A
>>
>> If there are no links between resource methods and parameters when how
>> usefull can a wadl be then?
>>
>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


cxf-java2wadl-plugin not generating resource to grammar mapping

2017-01-23 Thread nino martinez wael
Hi I've just run cxf-java2wadl-plugin on my project the resulting wadl
looks like this:

http://wadl.dev.java.net/2009/02; xmlns:xs="
http://www.w3.org/2001/XMLSchema;>










 (snip stop)
JAVA Rest endpoint:
public interface SimpleEndPoints {

@Path("/campaigns")
@GET
@Produces(value = MediaType.APPLICATION_JSON)
public List GetAllCampaignsStatus();


Now I would have expected that the WADL would look something like this:

http://wadl.dev.java.net/2009/02;
xmlns:xs="http://www.w3.org/2001/XMLSchema;>

  ...JAXB representation of FullCampaign..










 (snip stop)

Just like the example on w3c: https://www.w3.org/Submission/wadl/#x3-34000A

If there are no links between resource methods and parameters when how
usefull can a wadl be then?




-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: Dosgi rs wadl missing params for methods..

2017-01-19 Thread nino martinez wael
Ahh they are only on the interfaces..

On 19 Jan 2017 16:52, "Christian Schneider" <ch...@die-schneider.net> wrote:

> This is sometimes an issue of the visibility of the annotations. Do you
> import the annotation packages?
> If the annotations are just on the interfaces it might also be a java
> thing as java does not store param names on the interfaces.
>
> Christian
>
> On 19.01.2017 16:31, nino martinez wael wrote:
>
>> Hi we are having trouble getting cxf generating a complete wadl, params
>> are
>> missing in the wadl we get.. Everything else are there, grammars etc..
>>
>> We are using dosgi 2.0
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


Dosgi rs wadl missing params for methods..

2017-01-19 Thread nino martinez wael
Hi we are having trouble getting cxf generating a complete wadl, params are
missing in the wadl we get.. Everything else are there, grammars etc..

We are using dosgi 2.0


Re: Karaf custom distribution

2016-11-05 Thread nino martinez wael
Hi, you should write to the karaf list..

I think it will always use normal bundle resolution.. But you can override
it using bundle ranking..

On 5 Nov 2016 03:02, "Niten Aggarwal"  wrote:

> Hi All,
>
> Has anybody implemented karaf-assembly with custom boot features as it
> seems if you have multiple features which needs to be deployed in order,
> custom distribution is not maintaining deployment order of bundles.
> If anyone can share pom.xml it would be great..
>
> Thanks.
>
>
> ::DISCLAIMER::
> 
> 
> 
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any liability
> on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of the
> author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction,
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior
> written consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error
> please delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for viruses
> and other defects.
>
> 
> 
> 
>


Re: DOSGI LoggingInInterceptor remains silent?

2016-11-04 Thread nino martinez wael
Thanks :)

I'll check it out, as its something we will need...

On Fri, Nov 4, 2016 at 12:11 PM, Christian Schneider <
ch...@die-schneider.net> wrote:

> I have now committed the logging code change to master and 3.1.x.
> https://github.com/apache/cxf/commit/3d3e99d4efe2185b8dc156b
> f65892c3aa8707133
>
> You can already use it if you build CXF from source and install the
> current snapshot or just use similar code to export the intent in your own
> code.
>
> I have also extended the documentation of the CXF-DOSGi rest example to
> show how to use the new logging intent:
> https://github.com/apache/cxf-dosgi/tree/master/samples/rest
>
> This should already work with the CXF-DOSGi 2.0.0 distro as we do not need
> any changes there.
>
> I think this should at least work very well for the logging feature. Of
> course we can use the same pattern for other commonly used features to make
> them really easy to apply.
>
> Christian
>
>
>
> On 04.11.2016 11:48, Christian Schneider wrote:
>
>> In CXF-DOSGi 2 there is no property for setting interceptors. Currently
>> the only way is to use intents.
>>
>> See:
>> https://github.com/apache/cxf-dosgi/tree/master/common
>>
>> Here is an example for an intent:
>> https://github.com/apache/cxf-dosgi/blob/master/samples/ssl/
>> ssl-intent/src/main/java/org/apache/cxf/dosgi/samples/ssl/SslIntent.java
>>
>> The idea is to simply export an OSGi service with the LoggingFeature and
>> setting a property org.apache.cxf.dosgi.IntentName=logging.
>>
>> You can then use the property service.exported.intents=logging on your
>> remote service. CXF DOSGi will wait till all named intents are present and
>> then add them to your service
>> before publishing it.
>>
>> I am currently working on a change to the new logging support to
>> automatically export an intent service named logging. Then you can simply
>> add the property to your service and do not have to publish the intent
>> yourself.
>> See https://issues.apache.org/jira/browse/CXF-7125
>> I will shortly commit the code so you can see how it works.
>>
>> Currently this is not very well documented so let me know if you run into
>> problems.
>>
>> Btw. We also would like to get feedback if the intent approach is good or
>> if you would prefer something else.
>> The reason for the intent approach is that it does not have any
>> classloading issues and it allows to configure the intent using e.g. config
>> admin. Another important
>> point is that the intent name is also stored in discovery. So an
>> automatically created client will also get the intent applied.
>> We are aware that it is a more effort to setup though. So I would like to
>> hear what your experiences are with it in practice.
>>
>> Christian
>>
>>
>> Btw. For now there is also a nice workaround for logging. See Auto
>> logging in the link below:
>> http://cxf.apache.org/docs/message-logging.html
>> Activating it will install logging to all CXF endpoints and clients
>> including the DOSGi ones. Be aware though that the logging feature must
>> start before your service to make it work.
>>
>>
>> On 04.11.2016 11:24, nino martinez wael wrote:
>>
>>> cxf-dosgi-2.0.0
>>>
>>> On Fri, Nov 4, 2016 at 11:21 AM, Christian Schneider <
>>> ch...@die-schneider.net> wrote:
>>>
>>> Which DOSGi version do you use?
>>>>
>>>> Christian
>>>>
>>>> On 04.11.2016 11:11, nino martinez wael wrote:
>>>>
>>>> Hi
>>>>>
>>>>> I cannot get a request logger working I've tried this:
>>>>>
>>>>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>>>>> r.LoggingInInterceptor"
>>>>>
>>>>> But log remains silent, im using a plain karaf.. Do loglevels need to
>>>>> set
>>>>> anything specific?
>>>>>
>>>>>
>>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> http://www.talend.com
>>>>
>>>>
>>>>
>>>
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGI LoggingInInterceptor remains silent?

2016-11-04 Thread nino martinez wael
cxf-dosgi-2.0.0

On Fri, Nov 4, 2016 at 11:21 AM, Christian Schneider <
ch...@die-schneider.net> wrote:

> Which DOSGi version do you use?
>
> Christian
>
> On 04.11.2016 11:11, nino martinez wael wrote:
>
>> Hi
>>
>> I cannot get a request logger working I've tried this:
>>
>> "org.apache.cxf.rs.in.interceptors=org.apache.cxf.intercepto
>> r.LoggingInInterceptor"
>>
>> But log remains silent, im using a plain karaf.. Do loglevels need to set
>> anything specific?
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


DOSGI LoggingInInterceptor remains silent?

2016-11-04 Thread nino martinez wael
Hi

I cannot get a request logger working I've tried this:

"org.apache.cxf.rs.in.interceptors=org.apache.cxf.interceptor.LoggingInInterceptor"

But log remains silent, im using a plain karaf.. Do loglevels need to set
anything specific?

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: DOSGi-1.7.0 - SAXParseException during service creation. Service still registered

2016-10-22 Thread nino martinez wael
Have you tried validating your xml configuration?

On 21 Oct 2016 20:57, "Erwin Hogeweg"  wrote:

> Hi,
>
> I am struggling with this exception for a while now. It seems ‘harmless',
> but I am reluctant to just classify it as log-spam.
>
> I have the following definition in my remote-services.xml file:
>
> http://www.osgi.org/xmlns/rsa/v1.0.0;>
>   
> 
>   
> com.my.service.MyClientService
>   
> 
> http://some_host:18110/
> org.apache.cxf.ws
>   
> 
>
> This creates the following INFO msg in the log:
>
> [pool-4-thread-1] INFO org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore
> - Matching Interfaces for import: [com.my.service.MyClientService]
> [pool-4-thread-1] INFO org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore
> - Proxifying interface: com.my.service.MyClientService
> [pool-4-thread-1] INFO 
> org.apache.cxf.dosgi.dsw.handlers.PojoConfigurationTypeHandler
> - Creating a com.my.service.MyClientService client, endpoint address is
> http://some_host:18110/
> [Framework Event Dispatcher: Equinox Container: 
> 7098d908-bd97-0016-11e2-dc65d8e13fe9]
> WARN org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorImpl - Problem
> parsing: bundleentry://136.fwk1139700454/OSGI-INF/remote-
> service/remote-services.xml
> javax.xml.bind.UnmarshalException
>  - with linked exception:
> [org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 69;
> cvc-elt.1: Cannot find the declaration of element 'endpoint-descriptions'.]
> at javax.xml.bind.helpers.AbstractUnmarshallerImpl.
> createUnmarshalException(AbstractUnmarshallerImpl.java:335)
> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.
> createUnmarshalException(UnmarshallerImpl.java:563)
> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.
> UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.
> UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:221)
> at com.sun.xml.internal.bind.v2.runtime.unmarshaller.
> UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:276)
> at org.apache.cxf.dosgi.dsw.decorator.DecorationParser.getDecorations(
> DecorationParser.java:71)
> at org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorImpl.
> getDecorationElements(ServiceDecoratorImpl.java:78)
> at org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorImpl.addDecorations(
> ServiceDecoratorImpl.java:52)
> at org.apache.cxf.dosgi.dsw.decorator.ServiceDecoratorBundleListener
> .bundleChanged(ServiceDecoratorBundleListener.java:40)
> at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(
> BundleContextImpl.java:902)
> at org.eclipse.osgi.framework.eventmgr.EventManager.
> dispatchEvent(EventManager.java:230)
> at org.eclipse.osgi.framework.eventmgr.EventManager$
> EventThread.run(EventManager.java:340)
> Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber:
> 69; cvc-elt.1: Cannot find the declaration of element
> 'endpoint-descriptions'.
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.
> createSAXParseException(ErrorHandlerWrapper.java:203)
> at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(
> ErrorHandlerWrapper.java:134)
>
>
> Nevertheless, the service is registered and functional:
>
> g! services com.my.service.MyClientService
> {com.my.service.MyClientService}={endpoint.id=http://some_host:18110/,
> service.imported=true, service.imported.configs=org.apache.cxf.ws,
> service.id=129, service.bundleid=89, service.scope=bundle}
>   "Registered by bundle:" cxf-dosgi-ri-dsw-cxf_1.7.0 [89]
>
> Does anyone have an idea what is going on here, and what I need to do to
> get rid of the Exception in the log (short from tuning the logger config
> file…)?
>
> Any help is greatly appreciated.
>
> BTW… running with Equinox-3.10.2 on Oracle J8.
>
>
> Kind Regards,
>
> Erwin
>
> Erwin Hogeweg
> CTO
> 3690 Airport Road
> Boca Raton, FL 33431
> P. +1 (954) 556-6565
> M. +1 (561) 306-7395
> F. +1 (561) 948-2730
> [Seecago]
>


Re: [3.1.7] HTTPS / JAX-RS (non spring)

2016-10-10 Thread nino martinez wael
That does not solve the problem with using multiple bindings... Seems the
only way are going what Christian proposed (the path im following now)

On Mon, Oct 10, 2016 at 4:47 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

> Hi
>
> Ideally, when using JAXRSServerFactoryBean, you'd use a non-complete HTTP
> address (ex, "/oak") for CXF HTTP Transport to try to bind against OSGI
> HttpService.
>
> Cheers, Sergey
>
>
>
> On 08/10/16 11:48, nino martinez wael wrote:
>
>> Im wanting to a mix of https / http and probably different realms. cxf
>> dosgi seems to bring in the big guns for such a simple thing.. I mean
>> currently its only 3 lines of code.. if we goto 10 lines for https its
>> still okay.
>>
>> I believe it should be possible without spring..Or does CXF have a hard
>> tied spring dependency i've overlooked.?
>>
>> On Fri, Oct 7, 2016 at 11:00 PM, Christian Schneider <
>> ch...@die-schneider.net> wrote:
>>
>> If you use DS then you should take a look at CXF-DOSGi it allows to avoid
>>> the manual code for creating the the service.
>>> See: https://github.com/apache/cxf-dosgi/tree/master/samples/ssl
>>>
>>> On the server side you can simply configure pax-web to use ssl. Then you
>>> can use a relative url to make cxf use the HttpService.
>>> Alternatively you can also use a https url but I am not sure how to
>>> configure keystores and similar in this case.
>>>
>>> Christian
>>>
>>> 2016-10-07 17:15 GMT+02:00 nino martinez wael <
>>> nino.martinez.w...@gmail.com>
>>> :
>>>
>>> Hi
>>>>
>>>> How do I switch to HTTPS? Currently I have this:
>>>>
>>>> JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
>>>> sf.setResourceClasses(WhiteLabelEndPoint.class);
>>>> sf.setAddress("http://localhost:7521/oak;);
>>>> server = sf.create();
>>>>
>>>> I am not using spring and are having a little trouble seeing how to
>>>> configure the bus for https as all examples are pointing towards the
>>>> springbusfactory?
>>>>
>>>>
>>>> PS i am using OSGI with Karaf as container and Declarative services for
>>>> injection.
>>>>
>>>> --
>>>> Best regards / Med venlig hilsen
>>>> Nino Martinez
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>>> 46=http%3a%2f%2fwww.liquid-reality.de>
>>>
>>> Open Source Architect
>>> http://www.talend.com
>>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
>>> 46=http%3a%2f%2fwww.talend.com>
>>>
>>>
>>
>>
>>
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: [3.1.7] HTTPS / JAX-RS (non spring)

2016-10-08 Thread nino martinez wael
Im wanting to a mix of https / http and probably different realms. cxf
dosgi seems to bring in the big guns for such a simple thing.. I mean
currently its only 3 lines of code.. if we goto 10 lines for https its
still okay.

I believe it should be possible without spring..Or does CXF have a hard
tied spring dependency i've overlooked.?

On Fri, Oct 7, 2016 at 11:00 PM, Christian Schneider <
ch...@die-schneider.net> wrote:

> If you use DS then you should take a look at CXF-DOSGi it allows to avoid
> the manual code for creating the the service.
> See: https://github.com/apache/cxf-dosgi/tree/master/samples/ssl
>
> On the server side you can simply configure pax-web to use ssl. Then you
> can use a relative url to make cxf use the HttpService.
> Alternatively you can also use a https url but I am not sure how to
> configure keystores and similar in this case.
>
> Christian
>
> 2016-10-07 17:15 GMT+02:00 nino martinez wael <
> nino.martinez.w...@gmail.com>
> :
>
> > Hi
> >
> > How do I switch to HTTPS? Currently I have this:
> >
> > JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
> > sf.setResourceClasses(WhiteLabelEndPoint.class);
> > sf.setAddress("http://localhost:7521/oak;);
> > server = sf.create();
> >
> > I am not using spring and are having a little trouble seeing how to
> > configure the bus for https as all examples are pointing towards the
> > springbusfactory?
> >
> >
> > PS i am using OSGI with Karaf as container and Declarative services for
> > injection.
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46=http%3a%2f%2fwww.liquid-reality.de>
>
> Open Source Architect
> http://www.talend.com
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e
> 46=http%3a%2f%2fwww.talend.com>
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


[3.1.7] HTTPS / JAX-RS (non spring)

2016-10-07 Thread nino martinez wael
Hi

How do I switch to HTTPS? Currently I have this:

JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setResourceClasses(WhiteLabelEndPoint.class);
sf.setAddress("http://localhost:7521/oak;);
server = sf.create();

I am not using spring and are having a little trouble seeing how to
configure the bus for https as all examples are pointing towards the
springbusfactory?


PS i am using OSGI with Karaf as container and Declarative services for
injection.

-- 
Best regards / Med venlig hilsen
Nino Martinez