0

如何在java中迭代复杂类型的数组

anyType{schema=anyType{element=anyType{complexType=anyType{choice=anyType{element=anyType{complexType=anyType{sequence=anyType{element=anyType{}; 元素=anyType{}; 元素=anyType{}; 元素=anyType{}; }; }; }; }; }; }; }; diffgram=anyType{DocumentElement=anyType{default=anyType{guesttranunkid=1; 客人unkid = 1; 电话号码=900000000;emailid=Piyush@mail.com;}; 默认=anyType{guesttranunkid=2; 客人unkid = 2; 电话号码=992222222;emailid=ja@gmail.com; }; 默认=anyType{guesttranunkid=3; 客人unkid = 3; 电话号码=9999999999;emailid=yuvi@gmail.com;}; 默认=anyType{guesttranunkid=4; 客人unkid = 4; 电话号码=888888888;emailid=sachin@gmail.com;}; 默认=anyType{guesttranunkid=5; 客人unkid = 5; 电话号码=111111111;emailid=DD@gmail.com;}; 默认=anyType{guesttranunkid=6; 客人unkid = 6; 电话号码=3333333333;emailid=DD@gmail.com;}; 默认=anyType{guesttranunkid=7; 客人unkid = 7; 电话号码=12121212;emailid=CSK@gmail.com;}; 默认=anyType{guesttranunkid=8; 客人unkid = 8; 电话号码=1313131313;emailid=CSK@gmail.com;}; 默认=anyType{guesttranunkid=9; 客人unkid=9;电话号码=1414141414;emailid=MI@gmail.com; }; 默认=anyType{guesttranunkid=10; 客人unkid=10;电话号码=1515151;emailid=Devid@gmail.com;}; 默认=anyType{guesttranunkid=11; 客人unkid=11;电话号码=16161616;emailid=Smith@gmail.com;}; }; }; } emailid=Devid@gmail.com;}; 默认=anyType{guesttranunkid=11; 客人unkid=11;电话号码=16161616;emailid=Smith@gmail.com;}; }; }; } emailid=Devid@gmail.com;}; 默认=anyType{guesttranunkid=11; 客人unkid=11;电话号码=16161616;emailid=Smith@gmail.com;}; }; }; }

4

1 回答 1

2

您应该查看本教程以解析此类响应

Web Service That Returns An Array of Objects With KSOAP

另一种解析方式是使用 JSONObject 和 JSONArray

将 SoapObjects 数组手动解析为 POJO 数组

于 2012-04-10T10:18:07.377 回答