[Jersey-issues] [JIRA] Assigned: (JERSEY-1501) Content-Type: application/atom+xml makes response 415 when sending JAXBElement

  • From: "mfuksa (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [Jersey-issues] [JIRA] Assigned: (JERSEY-1501) Content-Type: application/atom+xml makes response 415 when sending JAXBElement
  • Date: Thu, 24 Jan 2013 10:34:53 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


     [ 
http://java.net/jira/browse/JERSEY-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

mfuksa reassigned JERSEY-1501:
------------------------------

    Assignee: mfuksa

> Content-Type: application/atom+xml makes response 415 when sending 
> JAXBElement
> ------------------------------------------------------------------------------
>
>                 Key: JERSEY-1501
>                 URL: http://java.net/jira/browse/JERSEY-1501
>             Project: jersey
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0-m09
>            Reporter: jan.supol
>            Assignee: mfuksa
>            Priority: Blocker
>             Fix For: 2.0-m12, 2.0
>
>   Original Estimate: 3 hours
>  Remaining Estimate: 3 hours
>
> (!) Note that this is quite different from JERSEY-1494, as this is on 
> server side, not on Response.readEntity().
> Suppose a following resource:
> {code:java}
> @Path("resource")
> public class Resource {
>       @Context HttpHeaders headers;
>       @Path("jaxb")   
>       @POST
>       public Response jaxb(JAXBElement<String> jaxb) {
>               MediaType media = headers.getMediaType();
>               return Response.ok(jaxb).type(media).build();
>       }
> }
> {code}
> The request results in response:
> {quote}
>  >> "POST /web/resource/jaxb HTTP/1.1[\r][\n]"
>  >> "Content-Type: application/atom+xml[\r][\n]"
>  >> "Accept: application/atom+xml[\r][\n]"
>  >> "Content-Length: 15[\r][\n]"
>  >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
>  >> "Host: localhost:6080[\r][\n]"
>  >> "[\r][\n]"
>  >> "<tag>jaxb</tag>"
>  << "HTTP/1.1 415 Unsupported Media Type[\r][\n]"
>  << "Server: Apache-Coyote/1.1[\r][\n]"
>  << "Content-Type: text/html;charset=utf-8[\r][\n]"
>  << "Content-Length: 1117[\r][\n]"
>  << "Date: Mon, 15 Oct 2012 15:44:06 GMT[\r][\n]"
> {quote}
> (!) For application/xml, response 200 is given, correctly. But the spec 
> says:
> {quote}
> javax.xml.bind.JAXBElement and application-supplied JAXB classes XML media 
> types (text/xml, application/xml and application/*+xml)
> {quote}
> Hence, this should work for application/*+xml, too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Jersey-issues] [JIRA] Assigned: (JERSEY-1501) Content-Type: application/atom+xml makes response 415 when sending JAXBElement

mfuksa (JIRA) 01/24/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150226.965aeb8)
 
 
Close
loading
Please Confirm
Close