You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nicolas De Loof <ni...@capgemini.com> on 2005/07/29 08:58:02 UTC
How to throw and AxisFault as HTTP 401
Hello,
I'm building a web service that has some security requirement that
cannot be checked before service invocation : I need to test service
params and compare with user principal to grant access to business service.
How can I throw an exception from my service that will be converterd to
an "Server.Unauthenticated" AxisFault ?
I was thinking about a specialized Handler that could intercept my
SecurityException and throw a new Axisfault, but I don't know where to
set it in handler chain (as onFault cannot throw AxisFault)
Nico.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Re: How to throw and AxisFault as HTTP 401
Posted by Anne Thomas Manes <at...@gmail.com>.
While it's true that you can't throw an AxisFault in the onFault
handler chain, you can change the fault -- just modify the message.
On 7/29/05, Nicolas De Loof <ni...@capgemini.com> wrote:
>
> Hello,
>
> I'm building a web service that has some security requirement that
> cannot be checked before service invocation : I need to test service
> params and compare with user principal to grant access to business service.
>
> How can I throw an exception from my service that will be converterd to
> an "Server.Unauthenticated" AxisFault ?
>
> I was thinking about a specialized Handler that could intercept my
> SecurityException and throw a new Axisfault, but I don't know where to
> set it in handler chain (as onFault cannot throw AxisFault)
>
> Nico.
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
>
>