RE: Request mapping warnings

2023-07-24 Thread Jean Pierre URKENS
Hi Andriy,

Removing the basepackages property indeed resolved the issue.

Regards,

J.P. Urkens

-Original Message-
From: Andriy Redko 
Sent: dinsdag 25 juli 2023 2:32
To: Jean Pierre URKENS 
Cc: Daniel Kulp 
Subject: Re: Request mapping warnings

Hi Jean,

The issue with duplicate beans registration comes from JAXRS server
definition:



The basePackages property triggers automatic scans which basically means
that the same beans will be discovered twice. I think you could safely bring
the @Service annotation back and remove basePackages property to get rid of
the issue.

Thanks!

Best Regards,
Andriy Redko

JPU> No, I am not using SpringBoot in any way.



JPU> Regards,



JPU> J.P.



JPU> *From:* Andrey Redko 
JPU> *Sent:* donderdag 20 juli 2023 15:24
JPU> *To:* Jean Pierre URKENS 
JPU> *Cc:* Daniel Kulp 
JPU> *Subject:* Re: Request mapping warnings



JPU> Hi Jean,



JPU> Do you use CXF Spring Boot autoconfiguration [1]? If yes, it has a
JPU> few controls over scans [1], either beans or classes (I am off this
JPU> week so cannot look into the configuration). Thank you.


JPU> [1] https://cxf.apache.org/docs/springboot.html

JPU> Best Regards,
JPU> Andriy Redko



JPU> On Thu, Jul 20, 2023, 2:23 AM Jean Pierre URKENS <
JPU> jean-pierre.urk...@devoteam.com> wrote:

JPU> Hi all,



JPU> As a test I removed the @org.springframework.stereotype.Service(“
JPU> *KmopDienstverlenerApi*”) annotation on my service implementation
JPU> class. So no @Service annotations further exist. Still when
JPU> checking the return of *JAXRSUtils.**getRootResources*(Message
JPU> message) via breakpoint I

JPU> Still notice that my service classes are listed twice in the return
JPU> result *List*.



JPU> The only annotations I’ve left in my code are:

JPU>- standard JAX-RS annotations:
JPU>
javax.ws.rs.[GET|POST|Consumes|Produces|HeaderParam|PathParam|QueryParam|Path|core.MediaType|core.Response]
JPU>- io.swagger.v3.oas.annotations.*

JPU> I suppose none of these would be responsible for an extra
JPU> registration of my service classes.



JPU> So the only point where service registration occurs is in the bean
JPU> declaration file cxf-endpoint.xml, see attachment. The only thing I
JPU> can think of a possible double registration in this file is the
JPU> declaration of the OpenApiFeature (e.g.  id=”*KmopOpenApiFeature*” …> ) for each resource endpoint in
JPU> addition to the  declaration using this OpenApiFeature.

JPU> But I would assume that configuring the OpenApiFeature, through a
JPU> bean declaration, wouldn’t register a service.



JPU> The ‘imported’ resources context-v2.xml and onderneming-context.xml
JPU> define some  instances that have nothing to do with
JPU> these JAX-WS/RS endpoints declared in this file.



JPU> Is there something I can trace into to see when a service gets
JPU> registered as a *ClassResourceInfo *?



JPU> Regards,



JPU> J.P. Urkens

JPU> *From:* Andrey Redko 
JPU> *Sent:* woensdag 19 juli 2023 19:30
JPU> *To:* Jean Pierre URKENS 
JPU> *Cc:* Daniel Kulp 
JPU> *Subject:* Re: Request mapping warnings



JPU> Hi Jean,



JPU> Indeed it looks like you have the same resource registered twice
JPU> hence the warning. It may come from the use of automatic resource
JPU> scans and manual resource registration.

JPU> Best Regards,
JPU> Andriy Redko



JPU> On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS <
JPU> jean-pierre.urk...@devoteam.com> wrote:

JPU> Still some minor issue related to request mapping.

JPU> I notice I am getting warnings like:

JPU> *2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
JPU> (SID=8806F673DEC6B53D9248AF0DD81F6882)
JPU> (org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102
JPU> ) - Both
JPU> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#ge
JPU> tDvlById
JPU> and
JPU> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#ge
JPU> tDvlById are equal candidates for handling the current request
JPU> which can lead to unpredictable results*

JPU> Obvious that they are equal candidates because they are the same
JPU> class. But what is the cause of this double detection?

JPU> Is it because when *JAXRSUtils.**getRootResources*(Message message)
JPU> gets called, I see that it contains 4 entries:

JPU> ·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint

JPU> ·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource

JPU> ·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

JPU> So twice my service implementation, I wouldn’t know why this is the
case?

JPU> On my classpath I have set:

JPU> ·   cxf-rt-rs-service-description-3.5.6.jar -> this
JPU> handles request for ‘_wadl’

JPU> ·   cxf-r

Re: Request mapping warnings

2023-07-24 Thread Andriy Redko
Hi Jean,

The issue with duplicate beans registration comes from JAXRS server definition:



The basePackages property triggers automatic scans which basically means that 
the same beans will be 
discovered twice. I think you could safely bring the @Service annotation back 
and remove basePackages
property to get rid of the issue. 

Thanks!

Best Regards,
Andriy Redko

JPU> No, I am not using SpringBoot in any way.



JPU> Regards,



JPU> J.P.



JPU> *From:* Andrey Redko 
JPU> *Sent:* donderdag 20 juli 2023 15:24
JPU> *To:* Jean Pierre URKENS 
JPU> *Cc:* Daniel Kulp 
JPU> *Subject:* Re: Request mapping warnings



JPU> Hi Jean,



JPU> Do you use CXF Spring Boot autoconfiguration [1]? If yes, it has a few
JPU> controls over scans [1], either beans or classes (I am off this week so
JPU> cannot look into the configuration). Thank you.


JPU> [1] https://cxf.apache.org/docs/springboot.html

JPU> Best Regards,
JPU> Andriy Redko



JPU> On Thu, Jul 20, 2023, 2:23 AM Jean Pierre URKENS <
JPU> jean-pierre.urk...@devoteam.com> wrote:

JPU> Hi all,



JPU> As a test I removed the @org.springframework.stereotype.Service(“
JPU> *KmopDienstverlenerApi*”) annotation on my service implementation class. So
JPU> no @Service annotations further exist. Still when checking the return of
JPU> *JAXRSUtils.**getRootResources*(Message message) via breakpoint I

JPU> Still notice that my service classes are listed twice in the return result
JPU> *List*.



JPU> The only annotations I’ve left in my code are:

JPU>- standard JAX-RS annotations:
JPU>
javax.ws.rs.[GET|POST|Consumes|Produces|HeaderParam|PathParam|QueryParam|Path|core.MediaType|core.Response]
JPU>- io.swagger.v3.oas.annotations.*

JPU> I suppose none of these would be responsible for an extra registration of
JPU> my service classes.



JPU> So the only point where service registration occurs is in the bean
JPU> declaration file cxf-endpoint.xml, see attachment. The only thing I can
JPU> think of a possible double registration in this file is the declaration of
JPU> the OpenApiFeature (e.g.  ) for each
JPU> resource endpoint in addition to the  declaration using
JPU> this OpenApiFeature.

JPU> But I would assume that configuring the OpenApiFeature, through a bean
JPU> declaration, wouldn’t register a service.



JPU> The ‘imported’ resources context-v2.xml and onderneming-context.xml define
JPU> some  instances that have nothing to do with these JAX-WS/RS
JPU> endpoints declared in this file.



JPU> Is there something I can trace into to see when a service gets registered
JPU> as a *ClassResourceInfo *?



JPU> Regards,



JPU> J.P. Urkens

JPU> *From:* Andrey Redko 
JPU> *Sent:* woensdag 19 juli 2023 19:30
JPU> *To:* Jean Pierre URKENS 
JPU> *Cc:* Daniel Kulp 
JPU> *Subject:* Re: Request mapping warnings



JPU> Hi Jean,



JPU> Indeed it looks like you have the same resource registered twice hence the
JPU> warning. It may come from the use of automatic resource scans and manual
JPU> resource registration.

JPU> Best Regards,
JPU> Andriy Redko



JPU> On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS <
JPU> jean-pierre.urk...@devoteam.com> wrote:

JPU> Still some minor issue related to request mapping.

JPU> I notice I am getting warnings like:

JPU> *2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
JPU> (SID=8806F673DEC6B53D9248AF0DD81F6882)
JPU> (org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102) - Both
JPU> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
JPU> and
JPU> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
JPU> are equal candidates for handling the current request which can lead to
JPU> unpredictable results*

JPU> Obvious that they are equal candidates because they are the same class. But
JPU> what is the cause of this double detection?

JPU> Is it because when *JAXRSUtils.**getRootResources*(Message message)  gets
JPU> called, I see that it contains 4 entries:

JPU> ·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint

JPU> ·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource

JPU> ·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

JPU> So twice my service implementation, I wouldn’t know why this is the case?

JPU> On my classpath I have set:

JPU> ·   cxf-rt-rs-service-description-3.5.6.jar -> this
JPU> handles request for ‘_wadl’

JPU> ·   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this
JPU> handles request for ‘openapi.[yaml|json]’

JPU> ·   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this
JPU> handles request for ‘Swagger documentation’

JPU> would this be a cause for my service e

RE: Request mapping warnings

2023-07-20 Thread Jean Pierre URKENS
No, I am not using SpringBoot in any way.



Regards,



J.P.



*From:* Andrey Redko 
*Sent:* donderdag 20 juli 2023 15:24
*To:* Jean Pierre URKENS 
*Cc:* Daniel Kulp 
*Subject:* Re: Request mapping warnings



Hi Jean,



Do you use CXF Spring Boot autoconfiguration [1]? If yes, it has a few
controls over scans [1], either beans or classes (I am off this week so
cannot look into the configuration). Thank you.


[1] https://cxf.apache.org/docs/springboot.html

Best Regards,
Andriy Redko



On Thu, Jul 20, 2023, 2:23 AM Jean Pierre URKENS <
jean-pierre.urk...@devoteam.com> wrote:

Hi all,



As a test I removed the @org.springframework.stereotype.Service(“
*KmopDienstverlenerApi*”) annotation on my service implementation class. So
no @Service annotations further exist. Still when checking the return of
*JAXRSUtils.**getRootResources*(Message message) via breakpoint I

Still notice that my service classes are listed twice in the return result
*List*.



The only annotations I’ve left in my code are:

   - standard JAX-RS annotations:
   
javax.ws.rs.[GET|POST|Consumes|Produces|HeaderParam|PathParam|QueryParam|Path|core.MediaType|core.Response]
   - io.swagger.v3.oas.annotations.*

I suppose none of these would be responsible for an extra registration of
my service classes.



So the only point where service registration occurs is in the bean
declaration file cxf-endpoint.xml, see attachment. The only thing I can
think of a possible double registration in this file is the declaration of
the OpenApiFeature (e.g.  ) for each
resource endpoint in addition to the  declaration using
this OpenApiFeature.

But I would assume that configuring the OpenApiFeature, through a bean
declaration, wouldn’t register a service.



The ‘imported’ resources context-v2.xml and onderneming-context.xml define
some  instances that have nothing to do with these JAX-WS/RS
endpoints declared in this file.



Is there something I can trace into to see when a service gets registered
as a *ClassResourceInfo *?



Regards,



J.P. Urkens

*From:* Andrey Redko 
*Sent:* woensdag 19 juli 2023 19:30
*To:* Jean Pierre URKENS 
*Cc:* Daniel Kulp 
*Subject:* Re: Request mapping warnings



Hi Jean,



Indeed it looks like you have the same resource registered twice hence the
warning. It may come from the use of automatic resource scans and manual
resource registration.

Best Regards,
Andriy Redko



On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS <
jean-pierre.urk...@devoteam.com> wrote:

Still some minor issue related to request mapping.

I notice I am getting warnings like:

*2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
(SID=8806F673DEC6B53D9248AF0DD81F6882)
(org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102) - Both
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
and
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
are equal candidates for handling the current request which can lead to
unpredictable results*

Obvious that they are equal candidates because they are the same class. But
what is the cause of this double detection?

Is it because when *JAXRSUtils.**getRootResources*(Message message)  gets
called, I see that it contains 4 entries:

·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint

·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource

·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

So twice my service implementation, I wouldn’t know why this is the case?

On my classpath I have set:

·   cxf-rt-rs-service-description-3.5.6.jar -> this
handles request for ‘_wadl’

·   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this
handles request for ‘openapi.[yaml|json]’

·   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this
handles request for ‘Swagger documentation’

would this be a cause for my service endpoint to appear multiple times?
Aside from that I have no idea what could cause this.

J.P.

-Original Message-
From: Andriy Redko 
Sent: donderdag 13 juli 2023 18:24
To: Jean Pierre URKENS ; dev@cxf.apache.org
Subject: Re: How to setup multiple JAXRS server endpoints

Got it, thank you (the Swagger sometimes does surprising things).

Thursday, July 13, 2023, 1:33:07 AM, you wrote:

JPU> The @Parameter annotation seems to be ignored at this level.

JPU> -Original Message-

JPU> From: Jean Pierre URKENS 

JPU> Sent: donderdag 13 juli 2023 7:11

JPU> To: 'Andriy Redko' ; 'dev@cxf.apache.org'

JPU> 

JPU> Subject: RE: How to setup multiple JAXRS server endpoints

JPU> Yes, SwaggerUI works too!

JPU> I noticed that v2.x of swagger-jaxrs relates to OpenApi v3.1.x

JPU> while my spec is compliant with OpenApi v3.0.x, so I am going to

JPU> stick with v2.1.13 which seems to be that last version for OpenApi
v3.0.x.

JPU> I thought the @Parameter only applied to input parameters 

Re: Request mapping warnings

2023-07-20 Thread Andrey Redko
Hi Jean,

Do you use CXF Spring Boot autoconfiguration [1]? If yes, it has a few
controls over scans [1], either beans or classes (I am off this week so
cannot look into the configuration). Thank you.

[1] https://cxf.apache.org/docs/springboot.html

Best Regards,
Andriy Redko

On Thu, Jul 20, 2023, 2:23 AM Jean Pierre URKENS <
jean-pierre.urk...@devoteam.com> wrote:

> Hi all,
>
>
>
> As a test I removed the @org.springframework.stereotype.Service(“
> *KmopDienstverlenerApi*”) annotation on my service implementation class.
> So no @Service annotations further exist. Still when checking the return of
> *JAXRSUtils.**getRootResources*(Message message) via breakpoint I
>
> Still notice that my service classes are listed twice in the return result
> *List*.
>
>
>
> The only annotations I’ve left in my code are:
>
>- standard JAX-RS annotations:
>
> javax.ws.rs.[GET|POST|Consumes|Produces|HeaderParam|PathParam|QueryParam|Path|core.MediaType|core.Response]
>- io.swagger.v3.oas.annotations.*
>
> I suppose none of these would be responsible for an extra registration of
> my service classes.
>
>
>
> So the only point where service registration occurs is in the bean
> declaration file cxf-endpoint.xml, see attachment. The only thing I can
> think of a possible double registration in this file is the declaration of
> the OpenApiFeature (e.g.  ) for each
> resource endpoint in addition to the  declaration using
> this OpenApiFeature.
>
> But I would assume that configuring the OpenApiFeature, through a bean
> declaration, wouldn’t register a service.
>
>
>
> The ‘imported’ resources context-v2.xml and onderneming-context.xml define
> some  instances that have nothing to do with these JAX-WS/RS
> endpoints declared in this file.
>
>
>
> Is there something I can trace into to see when a service gets registered
> as a *ClassResourceInfo *?
>
>
>
> Regards,
>
>
>
> J.P. Urkens
>
> *From:* Andrey Redko 
> *Sent:* woensdag 19 juli 2023 19:30
> *To:* Jean Pierre URKENS 
> *Cc:* Daniel Kulp 
> *Subject:* Re: Request mapping warnings
>
>
>
> Hi Jean,
>
>
>
> Indeed it looks like you have the same resource registered twice hence the
> warning. It may come from the use of automatic resource scans and manual
> resource registration.
>
> Best Regards,
> Andriy Redko
>
>
>
> On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS <
> jean-pierre.urk...@devoteam.com> wrote:
>
> Still some minor issue related to request mapping.
>
> I notice I am getting warnings like:
>
> *2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
> (SID=8806F673DEC6B53D9248AF0DD81F6882)
> (org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102) - Both
> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
> and
> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
> are equal candidates for handling the current request which can lead to
> unpredictable results*
>
> Obvious that they are equal candidates because they are the same class.
> But what is the cause of this double detection?
>
> Is it because when *JAXRSUtils.**getRootResources*(Message message)  gets
> called, I see that it contains 4 entries:
>
> ·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint
>
> ·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource
>
> ·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService
>
> So twice my service implementation, I wouldn’t know why this is the case?
>
> On my classpath I have set:
>
> ·   cxf-rt-rs-service-description-3.5.6.jar -> this
> handles request for ‘_wadl’
>
> ·   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this
> handles request for ‘openapi.[yaml|json]’
>
> ·   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this
> handles request for ‘Swagger documentation’
>
> would this be a cause for my service endpoint to appear multiple times?
> Aside from that I have no idea what could cause this.
>
> J.P.
>
> -Original Message-
> From: Andriy Redko 
> Sent: donderdag 13 juli 2023 18:24
> To: Jean Pierre URKENS ;
> dev@cxf.apache.org
> Subject: Re: How to setup multiple JAXRS server endpoints
>
> Got it, thank you (the Swagger sometimes does surprising things).
>
> Thursday, July 13, 2023, 1:33:07 AM, you wrote:
>
> JPU> The @Parameter annotation seems to be ignored at this level.
>
> JPU> -Original Message-
>
> JPU> From: Jean Pierre URKENS 
>
> JPU> Sent: donderdag 13 juli 2023 7:11
>
> JPU> To: 'Andriy Redko' ; &#x

RE: Request mapping warnings

2023-07-19 Thread Jean Pierre URKENS
Hi all,



As a test I removed the @org.springframework.stereotype.Service(“
*KmopDienstverlenerApi*”) annotation on my service implementation class. So
no @Service annotations further exist. Still when checking the return of
*JAXRSUtils.**getRootResources*(Message message) via breakpoint I

Still notice that my service classes are listed twice in the return result
*List*.



The only annotations I’ve left in my code are:

   - standard JAX-RS annotations:
   
javax.ws.rs.[GET|POST|Consumes|Produces|HeaderParam|PathParam|QueryParam|Path|core.MediaType|core.Response]
   - io.swagger.v3.oas.annotations.*

I suppose none of these would be responsible for an extra registration of
my service classes.



So the only point where service registration occurs is in the bean
declaration file cxf-endpoint.xml, see attachment. The only thing I can
think of a possible double registration in this file is the declaration of
the OpenApiFeature (e.g.  ) for each
resource endpoint in addition to the  declaration using
this OpenApiFeature.

But I would assume that configuring the OpenApiFeature, through a bean
declaration, wouldn’t register a service.



The ‘imported’ resources context-v2.xml and onderneming-context.xml define
some  instances that have nothing to do with these JAX-WS/RS
endpoints declared in this file.



Is there something I can trace into to see when a service gets registered
as a *ClassResourceInfo *?



Regards,



J.P. Urkens

*From:* Andrey Redko 
*Sent:* woensdag 19 juli 2023 19:30
*To:* Jean Pierre URKENS 
*Cc:* Daniel Kulp 
*Subject:* Re: Request mapping warnings



Hi Jean,



Indeed it looks like you have the same resource registered twice hence the
warning. It may come from the use of automatic resource scans and manual
resource registration.

Best Regards,
Andriy Redko



On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS <
jean-pierre.urk...@devoteam.com> wrote:

Still some minor issue related to request mapping.

I notice I am getting warnings like:

*2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
(SID=8806F673DEC6B53D9248AF0DD81F6882)
(org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102) - Both
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
and
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
are equal candidates for handling the current request which can lead to
unpredictable results*

Obvious that they are equal candidates because they are the same class. But
what is the cause of this double detection?

Is it because when *JAXRSUtils.**getRootResources*(Message message)  gets
called, I see that it contains 4 entries:

·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint

·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource

·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

So twice my service implementation, I wouldn’t know why this is the case?

On my classpath I have set:

·   cxf-rt-rs-service-description-3.5.6.jar -> this
handles request for ‘_wadl’

·   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this
handles request for ‘openapi.[yaml|json]’

·   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this
handles request for ‘Swagger documentation’

would this be a cause for my service endpoint to appear multiple times?
Aside from that I have no idea what could cause this.

J.P.

-Original Message-
From: Andriy Redko 
Sent: donderdag 13 juli 2023 18:24
To: Jean Pierre URKENS ; dev@cxf.apache.org
Subject: Re: How to setup multiple JAXRS server endpoints

Got it, thank you (the Swagger sometimes does surprising things).

Thursday, July 13, 2023, 1:33:07 AM, you wrote:

JPU> The @Parameter annotation seems to be ignored at this level.

JPU> -Original Message-

JPU> From: Jean Pierre URKENS 

JPU> Sent: donderdag 13 juli 2023 7:11

JPU> To: 'Andriy Redko' ; 'dev@cxf.apache.org'

JPU> 

JPU> Subject: RE: How to setup multiple JAXRS server endpoints

JPU> Yes, SwaggerUI works too!

JPU> I noticed that v2.x of swagger-jaxrs relates to OpenApi v3.1.x

JPU> while my spec is compliant with OpenApi v3.0.x, so I am going to

JPU> stick with v2.1.13 which seems to be that last version for OpenApi
v3.0.x.

JPU> I thought the @Parameter only applied to input parameters ("query",

JPU> "header", "path" or "cookie" parameters), but I'll give it a try.

JPU> J.P.

JPU> -Original Message-

JPU> From: Andriy Redko 

JPU> Sent: woensdag 12 juli 2023 22:16

JPU> To: Jean Pierre URKENS ;

JPU> dev@cxf.apache.org

JPU> Subject: Re: How to setup multiple JAXRS server endpoints

JPU> Hi Jean,

JPU> That's awesome, have you got SwaggerUI working as well?

JPU> Yes, you could use 2.2.15 (we already updated to this version, no

JPU> regressions). It seems like the description a

Re: Request mapping warnings

2023-07-19 Thread Jean Pierre URKENS
Could be, due to the (spring) @Service annotation in addition to the bean 
declaration in the cxf-endpoints.xml ?

Verzonden vanaf Outlook voor Android<https://aka.ms/AAb9ysg>

From: Andrey Redko 
Sent: Wednesday, July 19, 2023 7:29:47 PM
To: Jean Pierre URKENS 
Cc: Daniel Kulp 
Subject: Re: Request mapping warnings

Hi Jean,

Indeed it looks like you have the same resource registered twice hence the 
warning. It may come from the use of automatic resource scans and manual 
resource registration.

Best Regards,
Andriy Redko

On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS 
mailto:jean-pierre.urk...@devoteam.com>> wrote:

Still some minor issue related to request mapping.

I notice I am getting warnings like:

2023-07-19 13:08:23,022 [T8N1TP1-4] WARN  
(SID=8806F673DEC6B53D9248AF0DD81F6882) 
(org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102) - Both 
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById and 
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById are 
equal candidates for handling the current request which can lead to 
unpredictable results

Obvious that they are equal candidates because they are the same class. But 
what is the cause of this double detection?

Is it because when JAXRSUtils.getRootResources(Message message)  gets called, I 
see that it contains 4 entries:

•   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint

•   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource

•   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

So twice my service implementation, I wouldn’t know why this is the case?

On my classpath I have set:

•   cxf-rt-rs-service-description-3.5.6.jar -> this handles 
request for ‘_wadl’

•   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this handles 
request for ‘openapi.[yaml|json]’

•   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this handles 
request for ‘Swagger documentation’

would this be a cause for my service endpoint to appear multiple times? Aside 
from that I have no idea what could cause this.

J.P.

-Original Message-
From: Andriy Redko mailto:drr...@gmail.com>>
Sent: donderdag 13 juli 2023 18:24
To: Jean Pierre URKENS 
mailto:jean-pierre.urk...@devoteam.com>>; 
dev@cxf.apache.org<mailto:dev@cxf.apache.org>
Subject: Re: How to setup multiple JAXRS server endpoints

Got it, thank you (the Swagger sometimes does surprising things).

Thursday, July 13, 2023, 1:33:07 AM, you wrote:

JPU> The @Parameter annotation seems to be ignored at this level.

JPU> -Original Message-

JPU> From: Jean Pierre URKENS 
mailto:jean-pierre.urk...@devoteam.com>>

JPU> Sent: donderdag 13 juli 2023 7:11

JPU> To: 'Andriy Redko' mailto:drr...@gmail.com>>; 
'dev@cxf.apache.org<mailto:dev@cxf.apache.org>'

JPU> mailto:dev@cxf.apache.org>>

JPU> Subject: RE: How to setup multiple JAXRS server endpoints

JPU> Yes, SwaggerUI works too!

JPU> I noticed that v2.x of swagger-jaxrs relates to OpenApi v3.1.x

JPU> while my spec is compliant with OpenApi v3.0.x, so I am going to

JPU> stick with v2.1.13 which seems to be that last version for OpenApi v3.0.x.

JPU> I thought the @Parameter only applied to input parameters ("query",

JPU> "header", "path" or "cookie" parameters), but I'll give it a try.

JPU> J.P.

JPU> -Original Message-

JPU> From: Andriy Redko mailto:drr...@gmail.com>>

JPU> Sent: woensdag 12 juli 2023 22:16

JPU> To: Jean Pierre URKENS 
mailto:jean-pierre.urk...@devoteam.com>>;

JPU> dev@cxf.apache.org<mailto:dev@cxf.apache.org>

JPU> Subject: Re: How to setup multiple JAXRS server endpoints

JPU> Hi Jean,

JPU> That's awesome, have you got SwaggerUI working as well?

JPU> Yes, you could use 2.2.15 (we already updated to this version, no

JPU> regressions). It seems like the description applies to the whole

JPU> schema (which is the same for both properties), may be you could

JPU> use @Parameter

JPU> instead:

JPU> @Parameter(description="The description I want for prop1")

JPU> Thank you.

JPU> Best Regards,

JPU> Andriy Redko

>> Hi Andriy,

>> After having migrated everything to "io.swagger.v3.oas.annotations.*"

>> the swagger endpoints for each of my services became active.

>> So far so good, but I do notice that there are discrepancies when

>> annotating models, e.g.:

>>  public class Model1 {

>>   @Schema(description="The description I want for prop1")

>>private Model2 prop1;

>>   @Schema(description="The description I want for prop2")

>>private Model2 prop2;

>>   ...

>> }


Re: Request mapping warnings

2023-07-19 Thread Andrey Redko
Hi Jean,

Indeed it looks like you have the same resource registered twice hence the
warning. It may come from the use of automatic resource scans and manual
resource registration.

Best Regards,
Andriy Redko

On Wed, Jul 19, 2023, 7:39 AM Jean Pierre URKENS <
jean-pierre.urk...@devoteam.com> wrote:

> Still some minor issue related to request mapping.
>
> I notice I am getting warnings like:
>
>*2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
>   (SID=8806F673DEC6B53D9248AF0DD81F6882)
>   (org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102) - 
> Both
>   
> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
>   and
>   
> be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
>   are equal candidates for handling the current request which can lead to
>   unpredictable results*
>
> Obvious that they are equal candidates because they are the same class. But
> what is the cause of this double detection?
>
> Is it because when* JAXRSUtils.**getRootResources*(Message message)  gets
> called, I see that it contains 4 entries:
>
> ·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint
>
> ·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource
>
> ·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService
>
> So twice my service implementation, I wouldn’t know why this is the case?
>
> On my classpath I have set:
>
> ·   cxf-rt-rs-service-description-3.5.6.jar -> this
> handles request for ‘_wadl’
>
> ·   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this
> handles request for ‘openapi.[yaml|json]’
>
> ·   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this
> handles request for ‘Swagger documentation’
>
> would this be a cause for my service endpoint to appear multiple times?
> Aside from that I have no idea what could cause this.
>
> J.P.
>
> -Original Message-
> From: Andriy Redko 
> Sent: donderdag 13 juli 2023 18:24
> To: Jean Pierre URKENS ;
> dev@cxf.apache.org
> Subject: Re: How to setup multiple JAXRS server endpoints
>
> Got it, thank you (the Swagger sometimes does surprising things).
>
> Thursday, July 13, 2023, 1:33:07 AM, you wrote:
>
> JPU> The @Parameter annotation seems to be ignored at this level.
>
> JPU> -Original Message-
>
> JPU> From: Jean Pierre URKENS 
>
> JPU> Sent: donderdag 13 juli 2023 7:11
>
> JPU> To: 'Andriy Redko' ; 'dev@cxf.apache.org'
>
> JPU> 
>
> JPU> Subject: RE: How to setup multiple JAXRS server endpoints
>
> JPU> Yes, SwaggerUI works too!
>
> JPU> I noticed that v2.x of swagger-jaxrs relates to OpenApi v3.1.x
>
> JPU> while my spec is compliant with OpenApi v3.0.x, so I am going to
>
> JPU> stick with v2.1.13 which seems to be that last version for OpenApi
> v3.0.x.
>
> JPU> I thought the @Parameter only applied to input parameters ("query",
>
> JPU> "header", "path" or "cookie" parameters), but I'll give it a try.
>
> JPU> J.P.
>
> JPU> -Original Message-
>
> JPU> From: Andriy Redko 
>
> JPU> Sent: woensdag 12 juli 2023 22:16
>
> JPU> To: Jean Pierre URKENS ;
>
> JPU> dev@cxf.apache.org
>
> JPU> Subject: Re: How to setup multiple JAXRS server endpoints
>
> JPU> Hi Jean,
>
> JPU> That's awesome, have you got SwaggerUI working as well?
>
> JPU> Yes, you could use 2.2.15 (we already updated to this version, no
>
> JPU> regressions). It seems like the description applies to the whole
>
> JPU> schema (which is the same for both properties), may be you could
>
> JPU> use @Parameter
>
> JPU> instead:
>
> JPU> @Parameter(description="The description I want for prop1")
>
> JPU> Thank you.
>
> JPU> Best Regards,
>
> JPU> Andriy Redko
>
> >> Hi Andriy,
>
> >> After having migrated everything to "io.swagger.v3.oas.annotations.*"
>
> >> the swagger endpoints for each of my services became active.
>
> >> So far so good, but I do notice that there are discrepancies when
>
> >> annotating models, e.g.:
>
> >>  public class Model1 {
>
> >>   @Schema(description="The description I want for prop1")
>
> >>private Model2 prop1;
>
> >>   @Schema(description="The description I want for prop2")
>
> >>private Model2 prop2;
>
> >>   ...
>
> >> }
>
> >> When I generate the openapi.[json|yaml] specification I see that both
>
> >> prop1 and prop2 have a reference to the schema component "Model2"
>
> >> with description ' The description I want for prop2' which is
>
> >> inappropriate for 'prop1'.
>
> >> It is not unlikely to have multiple properties within one Model that
>
> >> are of the same class but are semantically used in a different context.
> E.g.
>
> >> something as simple as a ShipmentOrder having two 'Address'
>
> >> properties 'from' and 'to' would result in wrong API documentation.
>
> >> I am aware it has nothing to do with CXF but rather with
>
> >> swagger-jaxrs2-vx.y.z.jar and depending libraries. CXF-3.5.6 has
>
> >> dependency on swagger-jaxrs2-2.1.13.jar. Would it be an issue t

Request mapping warnings

2023-07-19 Thread Jean Pierre URKENS
 Request mapping warnings

Still some minor issue related to request mapping.

I notice I am getting warnings like:

   *2023-07-19 13:08:23,022 [T8N1TP1-4] WARN
  (SID=8806F673DEC6B53D9248AF0DD81F6882)
  (org.apache.cxf.jaxrs.model.OperationResourceInfoComparatorBase:102)
- Both
  
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
  and
  
be.dvtm.aeo.op.openapi.api.impl.KmopDienstverlenerApiServiceImpl#getDvlById
  are equal candidates for handling the current request which can lead to
  unpredictable results*

Obvious that they are equal candidates because they are the same class. But
what is the cause of this double detection?

Is it because when* JAXRSUtils.**getRootResources*(Message message)  gets
called, I see that it contains 4 entries:

·   (twice) KmopDienstverlenerApiServiceImpl -> my service endpoint

·   io.swagger.v3.jaxrs2.integration.resources.OpenApiResource

·   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

So twice my service implementation, I wouldn’t know why this is the case?

On my classpath I have set:

·   cxf-rt-rs-service-description-3.5.6.jar -> this
handles request for ‘_wadl’

·   cxf-rt-rs-service-description-openapi-v3-3.5.6.jar  -> this
handles request for ‘openapi.[yaml|json]’

·   cxf-rt-rs-service-description-swagger-ui-3.5.6.jar  -> this
handles request for ‘Swagger documentation’

would this be a cause for my service endpoint to appear multiple times?
Aside from that I have no idea what could cause this.

J.P.

-Original Message-
From: Andriy Redko 
Sent: donderdag 13 juli 2023 18:24
To: Jean Pierre URKENS ; dev@cxf.apache.org
Subject: Re: How to setup multiple JAXRS server endpoints

Got it, thank you (the Swagger sometimes does surprising things).

Thursday, July 13, 2023, 1:33:07 AM, you wrote:

JPU> The @Parameter annotation seems to be ignored at this level.

JPU> -Original Message-

JPU> From: Jean Pierre URKENS 

JPU> Sent: donderdag 13 juli 2023 7:11

JPU> To: 'Andriy Redko' ; 'dev@cxf.apache.org'

JPU> 

JPU> Subject: RE: How to setup multiple JAXRS server endpoints

JPU> Yes, SwaggerUI works too!

JPU> I noticed that v2.x of swagger-jaxrs relates to OpenApi v3.1.x

JPU> while my spec is compliant with OpenApi v3.0.x, so I am going to

JPU> stick with v2.1.13 which seems to be that last version for OpenApi
v3.0.x.

JPU> I thought the @Parameter only applied to input parameters ("query",

JPU> "header", "path" or "cookie" parameters), but I'll give it a try.

JPU> J.P.

JPU> -Original Message-

JPU> From: Andriy Redko 

JPU> Sent: woensdag 12 juli 2023 22:16

JPU> To: Jean Pierre URKENS ;

JPU> dev@cxf.apache.org

JPU> Subject: Re: How to setup multiple JAXRS server endpoints

JPU> Hi Jean,

JPU> That's awesome, have you got SwaggerUI working as well?

JPU> Yes, you could use 2.2.15 (we already updated to this version, no

JPU> regressions). It seems like the description applies to the whole

JPU> schema (which is the same for both properties), may be you could

JPU> use @Parameter

JPU> instead:

JPU> @Parameter(description="The description I want for prop1")

JPU> Thank you.

JPU> Best Regards,

JPU> Andriy Redko

>> Hi Andriy,

>> After having migrated everything to "io.swagger.v3.oas.annotations.*"

>> the swagger endpoints for each of my services became active.

>> So far so good, but I do notice that there are discrepancies when

>> annotating models, e.g.:

>>  public class Model1 {

>>   @Schema(description="The description I want for prop1")

>>private Model2 prop1;

>>   @Schema(description="The description I want for prop2")

>>private Model2 prop2;

>>   ...

>> }

>> When I generate the openapi.[json|yaml] specification I see that both

>> prop1 and prop2 have a reference to the schema component "Model2"

>> with description ' The description I want for prop2' which is

>> inappropriate for 'prop1'.

>> It is not unlikely to have multiple properties within one Model that

>> are of the same class but are semantically used in a different context.
E.g.

>> something as simple as a ShipmentOrder having two 'Address'

>> properties 'from' and 'to' would result in wrong API documentation.

>> I am aware it has nothing to do with CXF but rather with

>> swagger-jaxrs2-vx.y.z.jar and depending libraries. CXF-3.5.6 has

>> dependency on swagger-jaxrs2-2.1.13.jar. Would it be an issue to

>> replace this dependency with e.g. swagger-jaxrs2-2.2.15.jar (latest

>> stable release according to maven