Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

jaxrs jms transport

$
0
0
Hello,

I've some jaxrs resources I'd like to access in JMS.
Like this guy :

@Path("/urlplan/{codeArmoire}")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public List<UrlPlan> getUrlPlan(
@PathParam("codeArmoire") String codeArmoire,
UrlPlanQuery urlPlanQuery)
throws MapException

I tried to do this using the resources I've found on the documentation
https://cxf.apache.org/docs/jms-transport.html
https://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-JMSSupport

I also found simplistic exemple in the tests source code
(JAXRSJmsTest.java).

But I can't make this to work.

Questions:
Is there a complete working sample code for my case :
- jaxrs resources
- accessed via jms transport
- with error management
- with body in POST request (actualy some geojson)
- with transaction in order to have rollback, redelivery and DLQ

I'm using CXF 3.
There are some source code in the attached zip, including dependencies list.

My problems :
- the body never gets to my resource method parameter 'urlPlanQuery'
- when error occurs the jms message is lost (no DLQ, just error logs)
- when I adapt code just as a poc, the result is never writen
: message.getContent(OutputStream.class) is always null so I've a NPE
in PrimitiveTextProvider#writeTo

Sylvain Mougenot

Viewing all articles
Browse latest Browse all 5648

Trending Articles