Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
atmosphere-runtime 2.1.7
Apache Tomcat/7.0.52
Description
When using websocket jax-rs in container mode with atmoshpere,
org.apache.cxf.transport.endpoint.address is not set in the request used to resolve jaxrs resource, which means it will not trucate the
container path in the uri before comparing with @Path, and since WebSocketVirtualServletRequest will check if the request is within the orgin path, work aound by request uri is not possible.
the request in the org.apache.cxf.transport.websocket.atmosphere.AtmosphereWebSocketHandler passed into org.apache.cxf.transport.websocket.atmosphere.AtmosphereWebSocketHandler.onMessage()
did contains the attribute, but it is not copied to the request created in createServletRequest
[INFO ] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.interceptor.LoggingInInterceptor| Inbound Message
----------------------------
ID: 8
Address: http://127.0.0.1:8080/jaxrs-websocket/websocket/web/bookstore/bookbought
Http-Method: GET
Content-Type:
Headers: {$method=[GET], $uri=[/jaxrs-websocket/websocket/web/bookstore/bookbought], Content-Type=[null]}
--------------------------------------
[DEBUG] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.phase.PhaseInterceptorChain| Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@5e834b36
[DEBUG] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.phase.PhaseInterceptorChain| Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@7a0522a5
[INFO ] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.transport.websocket.WebSocketVirtualServletRequest| getAttribute(org.apache.cxf.transport.endpoint.address)
[DEBUG] 10:03:01.926|http-bio-8080-exec-3|org.apache.cxf.jaxrs.utils.JAXRSUtils| Trying to select a resource class, request path : /jaxrs-websocket/websocket/web/bookstore/bookbought
[WARN ] 10:03:01.927|http-bio-8080-exec-3|org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor| No root resource matching request path /jaxrs-websocket/websocket/web/bookstore/bookbought has been found, Relative Path: /jaxrs-websocket/websocket/web/bookstore/bookbought. Please enable FINE/TRACE log level for more details.
[WARN ] 10:03:01.927|http-bio-8080-exec-3|org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper| javax.ws.rs.NotFoundException: HTTP 404 Not Found