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

Sergey Beryozkin commented on CXF-3782:
---------------------------------------

No worries, double-checking it was working ok did not harm :-)

> 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