On Thu, Sep 15, 2011 at 1:45 AM, Anuj Bhatia <anujbha...@gmail.com> wrote:
> Hi All,
> I'm trying to use Tuscany's rest binding to invoke a REST web service
> operation that return values using a custom header. But it looks like the
> custom header values are not returned by the rest binding classes and
> there's no way right now to add a custom JAX-RS provider to parse the
> response. Is my understanding correct?

The REST binding currently does not allow you to inject your own providers.

> The existing binding.rest does add two custom JAX_RS providers
> - DataBindingJAXRSReader and DataBindingJAXRSWriter - which hookups the
> Tuscany runtime's data binding framework and allows them to read and
> transform the request and response bodies, but there's no explicit support
> for parsing custom headers, right?
> Thanks
> Anuj
>

One of the benefits of using Tuscany/SCA is the ability to abstract
the actual infrastructure layer being used which allows your service
to be exposed with different bindings. Based on that, having your
service interface dependent directly on http specific things will make
it less flexible. Having said that, if this is really a requirement,
you could try using some of the JAX-RS/WINK specific resources into
your service like @Context
private HttpHeaders headers; or try using wink extensibility...



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to