[ 
https://issues.apache.org/jira/browse/CXF-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radosław Janas closed CXF-3782.
-------------------------------

       Resolution: Not A Problem
    Fix Version/s: Invalid

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


Reply via email to