Hi, Are you trying to use Tuscany on the client side to access the custom header from the response?
On the server side, you can pretty much use the JAX-RS mechanism on the interface. Same for the custom providers. Raymond Feng Sent from my iPhone On Sep 15, 2011, at 7:46 PM, Luciano Resende <[email protected]> wrote: > On Thu, Sep 15, 2011 at 1:45 AM, Anuj Bhatia <[email protected]> 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/
