Blog Archives
Commons HTTPClient 3.1 and 401 Unauthorized Error
Commons http client is a library provides the client-side implementation of most of the HTTP standards and recommendations. It is mainly used while building HTTP aware client applications such as web browsers, web service clients etc.
Recently while accessing the sql server reporting services, we faced an authentication error on one of the client environments. The stacktrace found was as below
2011-08-10 03:17:12,868 INFO [http-8080-2](HTTPSender.java:192) - Unable to sendViaPost to url[http://machine-name/ReportServer/ReportService2005.asmx] org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)