Hi This should work as expected, I have a test verifying it. Can you debug it ? Have a look please in JAXRSInvoker, it catches WebApplicationException and returns a Response. There's no test though verifying that this exception can be caugh when thrown from a subresource, but it should work fine too...
Cheers, Sergey > Hi, > > I've got a basic test application which I'm trying to get to return > HTTP error codes. In th eapplication I'm doing this: > > throw new WebApplicationException(HttpURLConnection.HTTP_FORBIDDEN); > > Which gives me this in my browser: > > <ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"> > <ns1:faultstring > xmlns:ns1="http://cxf.apache.org/bindings/xformat">javax.ws.rs.WebApplicationException</ns1:faultstring> > </ns1:XMLFault> > > I was expecting to see HTTP error 403. The resource class usess > application/xml for ProducesMime and ConsumesMime, is that what's > stopping me from seeing the HTTP error? > > Thanks, > Brad. ---------------------------- IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
