cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Mougenot <smouge...@sqli.com>
Subject Re: jaxrs jms transport
Date Thu, 04 Sep 2014 09:13:50 GMT
Thank you for the informations.
I've been hable to point my error : I was sending text message instead of
bytes message.
Now I'll give a try to the transaction to safely rely on redelivery policy
from the jms broker.

Thanks for your time
Sylvain

Sylvain Mougenot



On Wed, Sep 3, 2014 at 11:19 PM, Sergey Beryozkin <sberyozkin@gmail.com>
wrote:

> Hi
>
> Can you please start from JAXRSJmsTest ?
> It does show how to echo the data via POST.
>
> I can see the test configuration now uses a "http://www.w3.org/2010/
> soapjms/" transportId, but "http://cxf.apache.org/transports/jms"
> should actually work.
>
> I've never tried it to work with the transactions. I may need to ask
> Christian for some advice on how to make it work (assuming it does not work
> OOB with some extra configuration).
>
> Please give the test a try though, the test runs OK in builds.
> We also have a couple of demos where a single JAX-RS endpoint gets both
> HTTP and JMS messages but those demos still depend on 2.7.x and CXF JMS
> Transport support has completely changed in 3.0.x.
>
> Let me know if you can make the basic POST work first and in meantime we
> will investigate how to make the transactions work
>
> Thanks, Sergey
>
>
> On 03/09/14 18:12, Sylvain Mougenot wrote:
>
>> 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
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message