Sergey,

I think our emails crossed there. I'll have a look in JAXRSInvoker as suggested.


On Mon, Apr 28, 2008 at 4:37 PM, Brad <[EMAIL PROTECTED]> wrote:
> Just checked this by running it through TCPMon and I'm actually getting a 500:
>
>  HTTP/1.1 500 Internal Server Error
>  Server: Apache-Coyote/1.1
>  Content-Type: text/xml;charset=UTF-8
>  Content-Length: 201
>  Date: Mon, 28 Apr 2008 15:12:56 GMT
>  Connection: close
>
>
>  <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>
>
>  Am I doing the right thing by throwing the WebApplicationException?
>
>
>
>
>  On Mon, Apr 28, 2008 at 4:06 PM, Brad <[EMAIL PROTECTED]> wrote:
>  > 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.
>  >
>

Reply via email to