axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swetta Bhaskar" <sbhas...@csidentity.com>
Subject server class
Date Tue, 05 Apr 2011 18:59:53 GMT
Hello,

Can I not return Resultset as a return type from my Java class(Server.)

 

I am getting error with following response.

 

 

-
<http://127.0.0.1:50669/wse/wsdl/soap_envelope_xml.jsp?soapEnvelopeType=
1>  <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

-
<http://127.0.0.1:50669/wse/wsdl/soap_envelope_xml.jsp?soapEnvelopeType=
1>  <soapenv:Body>

-
<http://127.0.0.1:50669/wse/wsdl/soap_envelope_xml.jsp?soapEnvelopeType=
1>  <soapenv:Fault>

  <faultcode>soapenv:Server</faultcode> 

  <faultstring>org.apache.axis2.AxisFault: Mapping qname not fond for
the package: com.mysql.jdbc</faultstring> 

  <detail /> 

  </soapenv:Fault>

  </soapenv:Body>

  </soapenv:Envelope>

 

If yes please let me know:

 

   Java Class I have commented code using ArrayList, ArrayList worked
fine for me but I should not use it so:

package sdsdd;

 

import java.sql.*;

import java.util.ArrayList;

import java.util.List;

 

public class add {

                

                public ResultSet res(String group){

                                Connection con;

                                List result = null;

                                String query;

                                ResultSet rs=null;

                                ArrayList<Object> arr=new
ArrayList<Object>();

                                                try {

                                                                

                                                                

Class.forName("com.mysql.jdbc.Driver");

String url = "jdbc:mysql://localhost:3306/test";

con = DriverManager.getConnection(url, "root", "abcd1234");

Statement st = con.createStatement();

query="select * from detail where group1='"+ group + "'";

rs = st.executeQuery(query);

ResultSetMetaData col=rs.getMetaData();

int numCol=col.getColumnCount();

System.out.println(numCol);

while(rs.next())

         {

//ArrayList<Object> l=new ArrayList<Object>();

//

//

//      l.add(rs.getInt(1));

//      l.add(rs.getString(2));

//      l.add(rs.getString(3));

//  

//

//

//     arr.addAll(l);

                rs.getInt(1);

         }

 

 

 

                                                } catch
(ClassNotFoundException e) {

                                                                // TODO
Auto-generated catch block

 
e.printStackTrace();

                                                } catch (SQLException e)
{

                                                                // TODO
Auto-generated catch block

 
e.printStackTrace();

                                                }

                                                return rs;

}

 

}

 

 

 

If not which is the best possible way to return a  resultset.


Mime
View raw message