日期:2014-05-17  浏览次数:20636 次

axis2 客户端如何获取一个object list?
我自己建了一个axis2的项目,在客户端获取方法返回的object list时,报转型错误,求大侠指教
axis2 webservice

------解决方案--------------------
确定
([PmUser[]) response[0];返回的是一个array吗?
------解决方案--------------------
axis2 生成xml然后解析是可以的。
换个吧,返回生成代理。
------解决方案--------------------
多简单个事,你取个response[0]做什么

要么就是把response强转成对象数组,要么就是把response[0]强转成对象
------解决方案--------------------
引用:
Quote: 引用:

多简单个事,你取个response[0]做什么

要么就是把response强转成对象数组,要么就是把response[0]强转成对象

我直接将response强转成对象数组会报
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.jim.test.entity.PmUser;
at client.WeatherRPCClient.main(WeatherRPCClient.java:83)

我调用的那个方法是返回一个array的,但这边获取到的response里只有一个object,这是为什么?


数组长度不能为1吗?