-
1. Re: Custom 401 Error on Webservices (JBoss)
_marquez2012_ May 3, 2012 6:49 AM (in response to _marquez2012_)I found something very similar of what i pretend in this link : https://community.jboss.org/thread/80628?tstart=0 ... but this doesn't work on JBoss (Native) webservices.. I just want remove the version (JBoss Web/2.1.3.GA)
-
2. Re: Custom 401 Error on Webservices (JBoss)
_marquez2012_ May 3, 2012 1:46 PM (in response to _marquez2012_)The Webservice use the JBoss Web component to authenticate the username and password (with Basic Authentication). (Note that i'm using JBoss-ESB)
For this motive, we need to change this jar (jbossweb.jar) in \jboss-esb\server\<server-name>\deploy\jbossweb.sar.
We must edit the file "ServerInfo.properties" (in org\apache\catalina\util\) and change the property "server.info=2.1.3.GA" to "server.info=XPTO".
Alternatively, it´s also possible to re-build this jar and replace the tag @VERSION@ to XPTO (in the task Ant, i believe).
During this analysis, was also identified the possible implementation of our BasicAuthenticator. Thus it is possible to configure the error message (401) so as to make it more configurable (ultimately we can return other error).
To do this, you must change the configuration
<property name="authenticators">
<..>
<key>BASIC</key>
<value> MyClass </value>
in file war-deployers-jboss-beans.xml (in \jboss-esb\server\<server-name>\deployers\jbossweb.deployer\META-INF).