cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radosław Janas (JIRA) <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CXF-3782) Inconsistent response when throwing WebApplicationException with or without message in Response object
Date Thu, 01 Sep 2011 12:04:10 GMT

    [ https://issues.apache.org/jira/browse/CXF-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095248#comment-13095248
] 

Radosław Janas edited comment on CXF-3782 at 9/1/11 12:02 PM:
--------------------------------------------------------------

I figured out it happens only if I have logging interceptor (which i wrote myself basing on
org.apache.cxf.interceptor.LoggingOutInterceptor). After replacing to standard LoggingOutInterceptor
everything works fine, so... my mistake.

Sorry for wasted time.

      was (Author: rjanas):
    I figure out it happens only if I have logging interceptor (which i wrote myself basing
on org.apache.cxf.interceptor.LoggingOutInterceptor). After replacing to standard LoggingOutInterceptor
everything works fine, so... my mistake.

Sorry for wasted time.
  
> Inconsistent response when throwing WebApplicationException with or without message in
Response object
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3782
>                 URL: https://issues.apache.org/jira/browse/CXF-3782
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.4.2
>            Reporter: Radosław Janas
>             Fix For: Invalid
>
>
> I'm using cxf rest impl.
> I wrote simple rest service which takes xml body.
> When I throw WebApplicationException with Response object containing message (cxf makes
it internally i.e. when xml is not schema valid):
> {code}
> Response r = Response.status(400).type(MediaType.TEXT_PLAIN).entity(message).build();
> throw new WebApplicationException(t, r);
> {code}
> ... I get 400 Bad Request with text body
> When I throw WebApplicationException Response object NOT containing message (cxf makes
it internally i.e. when request body is empty):
> {code}
> Response r = Response.status(400).type(MediaType.TEXT_PLAIN).build();
> throw new WebApplicationException(t, r);
> {code}
> ... I get 200 OK.
> Why ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message