axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Chinthaka <chinth...@opensource.lk>
Subject Re: [Axis2] How to generate a 401 HTTP response code on server-side?
Date Wed, 23 May 2007 18:45:06 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Before throwing AxisFault, do the following.

messageContext.setProperty(Constants.HTTP_RESPONSE_STATE,
HttpServletResponse.SC_UNAUTHORIZED);

messageContext.setProperty(Constants.HTTP_BASIC_AUTH_REALM, "put your
basic auth realm");

HTH.
Chinthaka

Jin-Ha Tchoe wrote:
> Hi,
> 
> I'm trying to find out, how to get Axis2 to return a 401 HTTP response
> code in case a user provides wrong username and/or password to our
> service.
> I suspect that this can be accomplished by throwing the right AxisFault,
> but I found no information on the values that need to be set.
> Does anybody have some information? Am I running in the wrong direction?
> 
> Regards,
> 
> Jin-Ha Tchoe

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGVIuyjON2uBzUhh8RAgUBAJ9ReqdVF+FacPhAgUpnOJysuDETewCeOLmJ
nSddxoO3FXur9UIw6Ws9AT8=
=dnxK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message