[ERROR] Server returned HTTP response code: 401 for URL: http://server1-05.ad.com/metrojunction1/test/AddNumbersService?wsdl, "http://server1-05.ad.com/metrojunction1/test/AddNumbersService?wsdl" needs authorization, please provide authorization file with read access at C:\Documents and Settings\niranjan\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//<url-path>
Searched a lot in internet but of no help.
if anyone has already faced similar issue, and if fix be posted here will be very helpful.
Joined: Oct 04, 2006
My guess is that the web.xml deployment descriptor of the web service is not properly configured.
One should specify POST in the <http-method> element, as in the example below, not GET.
If you specify POST, then only requests sent to the service will require login and password. Requests for the WSDL, that use GET, will not require authentication.
Fragment from a web.xml deployment descriptor in which the security constraints for a web service has been specified: