You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Brad <cf...@javawork.co.uk> on 2008/07/28 18:24:50 UTC
JAX-RS: provider selection when "aacept" contains a list of values
Hi,
I'm having a problem where one of my client applications is unable to
get a response in their required media type.
Here's the method annotation:
@ProduceMime( {"application/xml", "application/json", "text/html",
"application/atom+xml"} )
The client is trying to get a JSON response using this HTTP header:
Accept: application/json, text/html, application/xml;q=0.9,
application/xhtml+xml, image/png, image/jpeg, image/gif,
image/x-xbitmap, */*;q=0.1
My initial response was that the client needs to reduce that header
value down to just "application/json" but I'm told their javascript
toolkit can only add to existing headers.
Anyway, I had a look in the providers section of the JAX-RS spec and
although there is a section on provider selection given a single value
it doesn't say anything about a list af values.
Could anyone give me an idea of what the expected behaviour is in this case?
Thanks,
Brad.
RE: JAX-RS: provider selection when "aacept" contains a list of values
Posted by Sergey Beryozkin <se...@iona.com>.
Hi
It's a regression, will merge this week...
Cheers, Sergey
-----Original Message-----
From: bradmoody@gmail.com [mailto:bradmoody@gmail.com] On Behalf Of Brad
Sent: 28 July 2008 17:25
To: users@cxf.apache.org
Subject: JAX-RS: provider selection when "aacept" contains a list of values
Hi,
I'm having a problem where one of my client applications is unable to
get a response in their required media type.
Here's the method annotation:
@ProduceMime( {"application/xml", "application/json", "text/html",
"application/atom+xml"} )
The client is trying to get a JSON response using this HTTP header:
Accept: application/json, text/html, application/xml;q=0.9,
application/xhtml+xml, image/png, image/jpeg, image/gif,
image/x-xbitmap, */*;q=0.1
My initial response was that the client needs to reduce that header
value down to just "application/json" but I'm told their javascript
toolkit can only add to existing headers.
Anyway, I had a look in the providers section of the JAX-RS spec and
although there is a section on provider selection given a single value
it doesn't say anything about a list af values.
Could anyone give me an idea of what the expected behaviour is in this case?
Thanks,
Brad.
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland