users@jsr311.java.net

Re: JAXRS handlers

From: Sergey Beryozkin <sergey.beryozkin_at_iona.com>
Date: Fri, 28 Mar 2008 17:10:20 -0000

Hi Stephan

> you are right, until now filtering is not possible. But I also think it
> is not useful to reinvent everything.

I thought it would be useful though for users to easily build add-on features.
For some cases one would be able to write a simple servlet filter, and something else for the same feature be supported in alternative environments.

> BTW: For this feature you request /foo.json and ready.
> (ApplicationConfig.getMediaTypeMapping() must know this mapping)

That was just the simplest possible example we support in CXF now at a 0.6 api level. We have a bunch of other ideas in mind, in some cases we need to do something and let the invocation continue in other we want to block it and return, in other cases we need an acces to the actual resource class, either on the inbound or on the outbound chain which is unlikely be available at say a servlet filter level.

I thought perhaps you can advise on how one can do with Spring but this wuld likely be off-topic for this thread. I'll ask what concrete JAX-Rs impls can offer in this area on related lists

Thanks, Sergey

> Hi Sergey,
>
> you are right, until now filtering is not possible. But I also think it
> is not useful to reinvent everything.
>
> BTW: For this feature you request /foo.json and ready.
> (ApplicationConfig.getMediaTypeMapping() must know this mapping)
>
> best regards
> Stephan
>> Here's a very simple example. I'd like to be able to debug my services
>> and check the formats of the representations without messing with
>> Accept header. I'd like to issue this query from my browser :
>>
>> /foo?_type=json
>>
>> Note, I don't want the application code to worry about supporting this
>> query, it can but it doesn't have to.
>> Can you advise me please on how can I solve the problem by using a
>> Spring integration capabilities ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland