日期:2014-05-17 浏览次数:20768 次
public class ReturnArrayList { public ArrayList sayHelloArray(String user){ ArrayList al = new ArrayList(); al.add("str01"); al.add("str02"); al.add("str02"); al.add("str02"); return al; } }
public class testAxis2ArrayListClient { public static void main(String[] args) { try { Axis2ArrayListTest a2t = new Axis2ArrayListTestStub(); SayHelloArray sayHelloArray = new SayHelloArray(); sayHelloArray.setUser("Garrick"); SayHelloArrayResponse response = a2t.sayHelloArray(sayHelloArray); ArrayList al = (ArrayList) response.get_return(); Iterator it = al.iterator(); while(it.hasNext()){ System.out.println(it.next()); } } catch (AxisFault e) { e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); } } }
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Any type element type has not been given at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at axisarray.Axis2ArrayListTestStub.fromOM(Axis2ArrayListTestStub.java:514) at axisarray.Axis2ArrayListTestStub.sayHelloArray(Axis2ArrayListTestStub.java:193) at testWebService.testAxis2ArrayListClient.main(testAxis2ArrayListClient.java:24) Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException: Any type element type has not been given at axisarray.SayHelloArrayResponse$Factory.parse(SayHelloArrayResponse.java:447) at axisarray.Axis2ArrayListTestStub.fromOM(Axis2ArrayListTestStub.java:508) ... 2 more Caused by: org.apache.axis2.databinding.ADBException: Any type element type has not been given at org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(ConverterUtil.java:1649) at axisarray.SayHelloArrayResponse$Factory.parse(SayHelloArrayResponse.java:425) ... 3 more