File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Rampart Axis2 passwordCallback method  - Urgent Please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Rampart Axis2 passwordCallback method  - Urgent Please" Watch "Rampart Axis2 passwordCallback method  - Urgent Please" New topic

Rampart Axis2 passwordCallback method - Urgent Please

UdayK Kumar

Joined: Aug 05, 2009
Posts: 26
Hi friends,

I am using axis2 1.4.1 and rampart 1.4 for web service security. For authentication I am using handlers. when I place database connection code in handler method I got the below exception. If I didn't put database connection it works fine.

my serverside handler code is

public PWCBHandler(){
System.out.println("Constructor of Handler class");
Connection connection = null;
Statement stmt = null;
ResultSet rs = null;
try {
connection = DriverManager.getConnection(URL, UID, PWD);
stmt = connection.createStatement();
rs = stmt.executeQuery("SELECT * FROM WEB_SERVICES_USERS");
Map users = new HashMap();
String userId = rs.getString(1);
String encPwd = rs.getString(2);
users.put(userId, encPwd);
System.out.println("No of Users = " + users.size());
} catch (ClassNotFoundException e) {
} catch (SQLException e1) {

Exception I am getting is:

[java] id = bob
[java] Exception in thread "main" org.apache.axis2.AxisFault: Read timed out
[java] at org.apache.axis2.AxisFault.makeFault(
[java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
[java] at org.apache.axis2.transport.http.HTTPSender.send(
[java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommon
[java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTran
[java] at org.apache.axis2.engine.AxisEngine.send(
[java] at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.jav
[java] at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperat
[java] at org.apache.axis2.client.OperationClient.execute(
[java] at org.apache.axis2.client.ServiceClient.sendReceive(
[java] at org.apache.axis2.client.ServiceClient.sendReceive(
[java] at Source)
[java] Caused by: Read timed out
[java] at Method)
[java] at
[java] at
[java] at
[java] at org.apache.commons.httpclient.HttpParser.readRawLine(
[java] at org.apache.commons.httpclient.HttpParser.readLine(
[java] at org.apache.commons.httpclient.HttpConnection.readLine(
[java] at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAd
[java] at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(
[java] at org.apache.commons.httpclient.HttpMethodBase.readResponse(
[java] at org.apache.commons.httpclient.HttpMethodBase.execute(
[java] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirec
[java] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector
[java] at org.apache.commons.httpclient.HttpClient.executeMethod(
[java] at org.apache.commons.httpclient.HttpClient.executeMethod(
[java] at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSend
[java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
[java] ... 10 more
[java] Java Result: 1

Please help me to resolve the above error.

I agree. Here's the link:
subject: Rampart Axis2 passwordCallback method - Urgent Please
It's not a secret anymore!