Try http://wso2.com/products/data-services-server/ which is built on Axis2.


On Wed, Apr 6, 2011 at 12:29 AM, Swetta Bhaskar <[email protected]>wrote:

> 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.
>



-- 
*Afkham Azeez*
Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
*
*
*Member; Apache Software Foundation;
**http://www.apache.org/*<http://www.apache.org/>
*
email: **[email protected]* <[email protected]>* cell: +94 77 3320919
blog: **http://blog.afkham.org* <http://blog.afkham.org>*
twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
*
*

Reply via email to