* @param conn the connection encountering the error
* @return the updated error message
*/
private String getErrorMessage(String message, NHttpClientConnection conn) {
if (conn != null && conn instanceof DefaultNHttpClientConnection) {
DefaultNHttpClientConnection c = ((DefaultNHttpClientConnection) conn);
Axis2HttpRequest axis2Request = (Axis2HttpRequest)
conn.getContext().getAttribute(AXIS2_HTTP_REQUEST);
if (c.getRemoteAddress() != null) {
return message + " For : " + c.getRemoteAddress().getHostAddress() + ":" +
c.getRemotePort() + (axis2Request != null ? " For Request : "
+ axis2Request : "");
}
}
return message;
}