Yes - you have a single JAX-RS endpoint with many root resources.
Instead you can have one JAX-RS endpoint per one root resource, ex, one per calendar, one per other root resource, etc.

Cheers, Sergey
On 20/08/16 04:19, Maxim Solodovnik wrote:
both 3.1.7 and 3.1.8-SNAPSHOT behave the same

http://localhost:5080/openmeetings/services/services (and
http://localhost:5080/openmeetings/services/services/)
has the full list of SOAP services and following block for REST

Available RESTful services:
Endpoint address: http://localhost:5080/openmeetings/services/
WADL : http://localhost:5080/openmeetings/services/?_wadl

is it what expected?

On Fri, Aug 19, 2016 at 11:55 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

Hi
On 19/08/16 17:50, Maxim Solodovnik wrote:

you are right
both
http://localhost:5080/openmeetings/services/services
and
http://localhost:5080/openmeetings/services/services/
display the list of SOAP services but zero REST services :(
would appreciate any help on resolving this :(

try adding back that cxf-rt-rs-service-description (and with
3.1.8-SNAPSHOT if in 3.1.7 does not work - recall that now it is
conditional on a bus property)


OK, I'll try I'm in Novosibirsk GMT+7
will check freenode channel, please ping me via email if I  :)

I did not know you were that far :-)

By the way re that d=0 with "http://localhost:5080/openmee
tings/services/calendar"

I'm pretty sure it becomes a non null a bit later. It is just historically
it was tuned about supporting SOAP destinations only and then that code
evolved a bit

SErgey


On Fri, Aug 19, 2016 at 11:44 PM, Sergey Beryozkin <sberyoz...@gmail.com>
wrote:

Right so in [2] this is what I meant, you have a CXF Destination available
at "/" - JAX-RS takes care of selecting the right class/method at a later
stage.

I'm not sure now what to do there. In my demo I saw no warning without a
trailing slash and all worked well but in your case you are still seeing
the problem with or without a slash - looks like some containers may
report
different values for an empty path, it does not seem to be a CXF issue.

I think right now if you do
/openmeetings/services/services - you'll get a services page no probs.

when you have '/openmeetings/services', combined with the fact you have
"/services/*" URL pattern, some ambiguities might happen.

In meantime, it probably makes sense to enforce CXF to treat path "/" a
bot more carefully (if the last segment is services)

(P.S - Max lets sync on Monday, by the way, believe it or not - I have a
question specifically for you, please join #apache-cxf at freenode on
Mon)

thanks, Sergey


On 19/08/16 17:03, Maxim Solodovnik wrote:

I have CXFServlet configured in web.xml [1]
and spring config: [2]
Additionally each service has annotations (for ex: [3])

something like this

[1]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetin
gs-web/src/main/webapp/WEB-INF/web.xml#L32
[2]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetin
gs-web/src/main/webapp/WEB-INF/classes/openmeetings-appli
cationContext.xml#L271
[3]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetin
gs-webservice/src/main/java/org/apache/openmeetings/
webservice/CalendarWebService.java#L63

On Fri, Aug 19, 2016 at 10:59 PM, Sergey Beryozkin <
sberyoz...@gmail.com>
wrote:

Hmm...,


On 19/08/16 16:51, Maxim Solodovnik wrote:

Actually I can see no difference between

http://localhost:5080/openmeetings/services
and
http://localhost:5080/openmeetings/services/

The weird thing is: CalendarWebService has annotation
@Path("/calendar")

can you remind me please how you set this up ? Did you say you have no

XML
involved ?

I was referring to the fact that you can have one relative path, the
one
you set with
jaxrs:server/@address in Spring or directly on JAXRSServerFactoryBean

thanks, Sergey


BUT
http://localhost:5080/openmeetings/services/calendar?_wadl
results to d== null

id seems like d == null for mapped path and d != null for the root
path

On Fri, Aug 19, 2016 at 10:40 PM, Sergey Beryozkin <
sberyoz...@gmail.com>
wrote:

OK, I have tried one of the demos we ship with CXF,

jax_rs/description_swagger2_web which uses Tomcat 7 plugin, its
CXFServlet has "/app/*".

If I try:

http://localhost:9000/app/services/

then I do get the services page back but I also see in the logs:

WARNING: Can't find the the request for
http://localhost:9000/app/serv
ices//'s Observer

But if I do

http://localhost:9000/app/services

then I get the service page immediately

If we have a trailing "/" and you have a JAXRS endpoint
CalendarWebService
also listening on "/" then it is a match.

I think as long as you have "/services" without the trailing slash
you
should see the services pages - can you try it please or may be
update
CalendarWebService to listen on something more specific than "/" ?

Thanks, Sergey



On 19/08/16 16:07, Maxim Solodovnik wrote:

for some unknown reason d != null in this line :(


d == ServletDestination
endpointInfo == BindingQName={http://apache.or
g/cxf/binding/jaxrs}binding
,
ServiceQName=, QName={
http://webservice.openmeetings.apache.org/}CalendarWebService
path == "/"

not sure why endpointInfo is like this :(


On Fri, Aug 19, 2016 at 8:22 PM, Sergey Beryozkin <
sberyoz...@gmail.com


wrote:


Hi Max

On 19/08/16 13:56, Maxim Solodovnik wrote:


you can download binary snapshot from here

https://builds.apache.org/view/M-R/view/OpenMeetings/job/

Openmeetings%203.2.x/146/
extract it to some new folder

run red5.sh (red5.bat) (or red5-debug.sh (red5-debug.bat))
go to http://localhost:5080/openmeetings/services/
this will result empty page (and 404 in the log)

Oh, I see, this is now different to what I thought the problem
was,

I thought that the services page that you see does not show JAX-RS

links
but the problem is - you do not see the service page at all

Hmm... I only updated there the formatter code which is used by the
service list page handler.

Have you added an endpoint that can handle 'services' path by any
chance
?


to use application you need to

go to http://localhost:5080/openmeetings and walk through
installer

:(

or you can ask me to do some investigation :))

It would be nice :-).

Can you please try


http://localhost:5080/openmeetings/services

(without the trailing '/') - that should not make a difference but
who
knows, just in case.

Can you also please download CXF 3.1.7 source (from Central) it is
the
same as in 3.1.8-SNAPSHOT in ServletController which is where I'd
like
to
ask you to put a breakpoint:
https://github.com/apache/cxf/blob/cxf-3.1.7/rt/transports/h
ttp/src/main/java/org/apache/cxf/transport/servlet/ServletCo
ntroller.java#L168
there you should reach line 176

Can you please try it and see why the service page branch is
skipped
in
your case ?

Thanks, Sergey



On Fri, Aug 19, 2016 at 7:17 PM, Sergey Beryozkin <

sberyoz...@gmail.com


wrote:


Sorry. I'm confused - that is 404.

What about the services page ?


Is there an easy way for me to reproduce it with open meetings ?

Cheers, Sergey


On 19/08/16 12:35, Maxim Solodovnik wrote:

just have tried:


webapps/openmeetings/WEB-INF/lib/cxf-core-3.1.8-SNAPSHOT.jar


webapps/openmeetings/WEB-INF/lib/cxf-rt-bindings-soap-3.1.8-
SNAPSHOT.jar

webapps/openmeetings/WEB-INF/lib/cxf-rt-bindings-xml-3.1.8-S
NAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-databinding-jaxb-3.1
.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-frontend-jaxrs-3.1.8
-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-frontend-jaxws-3.1.8
-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-frontend-simple-3.1.
8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-rs-extension-provide
rs-3.1.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-rs-service-descripti
on-3.1.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-transports-http-3.1.
8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-ws-addr-3.1.8-SNAPSH
OT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-wsdl-3.1.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-ws-policy-3.1.8-SNAP
SHOT.jar

spring config:
https://github.com/apache/openmeetings/blob/3.2.x/openmeetin
gs-web/src/main/webapp/WEB-INF/classes/openmeetings-appli

cationContext.xml#L271

Result:

---------------------------
ID: 1
Response-Code: 404
Content-Type:
Headers: {Date=[Fri, 19 Aug 2016 11:32:51 GMT],
Content-Length=[0]}
--------------------------------------


On Fri, Aug 19, 2016 at 4:14 PM, Sergey Beryozkin <
sberyoz...@gmail.com


wrote:



Hi Max


To have WADL links you need to add cxf-rt-rs-service-description


Can you try again please with 3.1.8-SNAPSHOT

Cheers, Sergey

On 19/08/16 04:15, Maxim Solodovnik wrote:

hmm,


just have tested, not working :( details:


libraries in classpath
webapps/openmeetings/WEB-INF/lib/cxf-core-3.1.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-bindings-soap-3.1.8-
SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-bindings-xml-3.1.8-S
NAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-databinding-jaxb-3.1
.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-frontend-jaxrs-3.1.8
-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-frontend-jaxws-3.1.8
-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-frontend-simple-3.1.
8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-rs-extension-provide
rs-3.1.8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-transports-http-3.1.
8-SNAPSHOT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-ws-addr-3.1.8-SNAPSH
OT.jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-wsdl-3.1.8-SNAPSHOT.
jar
webapps/openmeetings/WEB-INF/lib/cxf-rt-ws-policy-3.1.8-SNAP
SHOT.jar

servlet configuration:
        <servlet>
                <servlet-name>CXFServlet</servlet-name>

<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</
servlet-class>
                <init-param>
                        <param-name>config-location</p
aram-name>

<param-value>classpath:openmeetings-applicationContext.xml</
param-value>
                </init-param>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
                <servlet-name>CXFServlet</servlet-name>
                <url-pattern>/services/*</url-pattern>
        </servlet-mapping>

SOAP services are configured in spring config, REST are
configured
via
annotations
I'm using java only no XML approach :)

What am I missing?


On Fri, Aug 19, 2016 at 8:29 AM, Maxim Solodovnik <
solomax...@gmail.com


wrote:



Thanks for the quick answer Sergey :)


I'll check SNAPSHOT and will write back here :)


What additional dependencies need to be added to display the

list
of
both
SOAP and REST services?

On Thu, Aug 18, 2016 at 10:38 PM, Sergey Beryozkin <
sberyoz...@gmail.com


wrote:



Hi Max



I updated CXF 3.1.7 to show the available endpoints if they
exist,

previously, if you only used either JAXWS or JAXRS you could

get
for
example:

SOAP endpoints:
(empty space)

REST endpoints:
some endpoints listed here

or

SOAP endpoints:
some endpoints listed here

REST endpoints:
(empty space)

which was 'noisy' so now in such case you'd either get only

SOAP endpoints:
some endpoints listed here

or

REST endpoints:
some endpoints listed here

So far it all should be fine.

Additionally, for JAXRS, I made it conditional on the
availability
of
the
bus property. Some users now use Swagger, some WADL, so
until
3.1.7
you'd
get an empty WADL link even if you use Swagger or if no WADL
dependency
exist.
So in CXF 3.1.7 WADLGenerator, if loaded, will set a bus
property
that
WADL is available, and if Swagger feature is loaded it will
set
a
property
indicating Swagger is available.

This helps to present JAX-RS links correctly in Services
page,
but
we've
found with Lukasz that in Blueprint one can get an empty bus
reference
in
the Service list formatter - it looks like you may be seeing
such
a
case
too. So in 3.1.8-SNAPSHOT I added the code that checks a
default
bus
in
such cases in the services page formatter

Can you please check 3.1.8-SNAPSHOT ?

Thanks, Sergey




On 18/08/16 15:45, Maxim Solodovnik wrote:

Hello,


recently I find out the list of all REST/SOAP services is
not

available

anymore (CXF 3.1.7)
It was working some time ago

Should I make any changes to make it work again?

I tried to add cxf-rt-rs-service-description-3.1.7.jar as
dependency,
but
it doesn't help :(

Thanks a lot for your help





--


WBR

Maxim aka solomax














--

Sergey Beryozkin

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






--

Sergey Beryozkin

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










--
Sergey Beryozkin

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










--
Sergey Beryozkin

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

Reply via email to