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

Gabo Manuel reopened CXF-2046:
------------------------------


Hi Sergey,

> Hi Gabo - I'm closing this JIRA for now as I can't see a bogus Result tag 
> appearing.
> Feel free to reopen please if you can still see with 2.2.1 or later, ideally 
> with a test case attached :-)

Sorry for the late reply. I have just tested 2.2.1, and the problem is still 
there. Included in the archive is the test case requested. Along with a 
snapshot of the said problem, some logs and class path just in case something 
is wrong with the binaries I am using.

Thanks in advance.

> Response entity is enclosed in "Result" tags for classes implementing 
> ExceptionMapper
> -------------------------------------------------------------------------------------
>
>                 Key: CXF-2046
>                 URL: https://issues.apache.org/jira/browse/CXF-2046
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2
>         Environment: Java 1.5
> Jetty 6.1
>            Reporter: Gabo Manuel
>             Fix For: 2.2
>
>         Attachments: rtbe-ws4-retest_jira.zip
>
>
> Environment and objects involved is the same as that in another issue: 
> https://issues.apache.org/jira/browse/CXF-2045
> Additional objects involved:
> public class RuntimeExceptionMapper implements 
> ExceptionMapper<RuntimeException>{
>     private static Logger logger = 
> Logger.getLogger(RuntimeExceptionMapper.class);
>     public Response toResponse(RuntimeException fault) {
>         StringBuffer sb = new StringBuffer();
>         sb.append("Generate some custom message to hide the real problem from 
> end user.");
>         
>         ResponseBuilder rb = Response.status(500);
>         rb.type(MediaType.TEXT_PLAIN_TYPE);
>         rb.entity(sb.toString());
>         logger.fatal(fault);
>         
>         Response resp = rb.build();
>         
>         logger.info("entity: " + resp.getEntity().toString());
>         
>         return resp;
>     }
> }
> Logs captured by TCPMon
> HTTP/1.1 500 Internal Server Error
> Content-Type: text/plain
> Content-Length: 69
> Server: Jetty(6.1.11)
> <Result>Generate some custom message to hide the real problem from end 
> user.</Result>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to