专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Weblogic

jbuilder 2006 在构建web service是数据表返回的有关问题,多谢大家,高分回报

发布时间:2010-06-14 17:22:11 文章来源:www.iduyao.cn 采编人员:星星草
jbuilder 2006 在构建web service是数据表返回的问题,谢谢大家,高分回报.
使用jbuilder 2006 在weblogic下创建一个web service,通过jdbc读oracle的表,然后将表的数据传给客户端,resultset不能被序列化,所以使用List,编译部署都成功了,但是去访问就出错了,求教,请大家指点,谢谢了 


程序如下: 
  public List getTable() 
  { 
  DataSource ds ; 
  List ReturnDate = null; 
  Connection conn = null ; 
  ResultSet rs = null; 
  try 
  { 
  Bean1 ub = new Bean1(); 
  ds=getOracleDS(); 
  conn = ds.getConnection(); 
  Statement sta = conn.createStatement(); 
  rs = sta.executeQuery("Select * from testTable"); 
  ReturnDate = new ArrayList(); 
  while(rs.next() ) 
  { 
  ub.setFirst_Name(rs.getString("First_Name") ) ; 
  ub.setLast_Name(rs.getString("Last_Name") ) ; 
  ub.setAddress(rs.getString("Address") ); 
  ub.setCity(rs.getString("City") ); 
  ub.setCountry(rs.getString("Country") ); 
  ReturnDate.add(ub); 
  } 
  conn.close(); 
  } 
  catch (Exception e) 
  { 
  //异常处理 
  } 

  return ReturnDate; 
  } 
  private DataSource getOracleDS() throws NamingException 
  { 
  Context ctx = new InitialContext(); 
  return (DataSource) ctx.lookup("jdbc/testmdb"); 
  } 


错误提示如下: 

Invocation failed! 

Parameter Name Parameter Value 


Request sent to the server 

<!--REQUEST.................--> 
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<env:Header> 
</env:Header> 
<env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
  <m:getTable xmlns:m="http://beanexport"> 
  </m:getTable> 
</env:Body> 
</env:Envelope> 

Response from the server 

<!--RESPONSE.................--> 
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<env:Header> 
</env:Header> 
<env:Body> 
  <env:Fault> 
  <faultcode>env:Server </faultcode> 
  <faultstring>Exception during processing: weblogic.xml.schema.binding.SerializationException: type mapping lookup failure on class=class beanexport.Bean1 TypeMapping=TYPEMAPPING SIZE=2 
ENTRY 1: 
class: java.util.List 
xsd_type: ['java:language_builtins.util']:p1:List 
ser: weblogic.xml.schema.binding.internal.builtin.JavaUtilListCodec@532d15 
deser: weblogic.xml.schema.binding.internal.builtin.JavaUtilListCodec@b4e7ec 
ENTRY 2: 
class: beanexport.Tuple 
xsd_type: ['java:beanexport']:p2:Tuple 
ser: beanexport.TupleCodec@e6615f 
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: