Android调用.net写的webservice

lambp314 2012-12-14 10:23:34
碰到一个调用webservice的问题,希望高手指点:
用Ksoap调用.net写的webservice时,需要post数据给webservice
但是数据格式里面不是单一的数据组合,而是有包含二维的数据格式。不知道要怎么构造这个数据传递给服务器:
需要传的数据参数如下:
<soap:Body>
<HouseRegirsterMobile xmlns="http://tempuri.org/">
<houseAddress>string</houseAddress>
<houseOwner>string</houseOwner>
<houseOwnerIdCard>string</houseOwnerIdCard>
<houserOwnerTel>string</houserOwnerTel>
<rentPersonName>string</rentPersonName>
<rentPersonIdCard>string</rentPersonIdCard>
<rentPersonTel>string</rentPersonTel>
<rentStartDate>dateTime</rentStartDate>
<rentEndDate>dateTime</rentEndDate>
<livingPersonList>
<LivingPerson>
<LivingPersonName>string</LivingPersonName>
<LivingPersonIdCard>string</LivingPersonIdCard>
<LivingPersonTel>string</LivingPersonTel>
</LivingPerson>
<LivingPerson>
<LivingPersonName>string</LivingPersonName>
<LivingPersonIdCard>string</LivingPersonIdCard>
<LivingPersonTel>string</LivingPersonTel>
</LivingPerson>
</livingPersonList>
</HouseRegirsterMobile>
</soap:Body>

请问这段数据要怎么构造:
<livingPersonList>
<LivingPerson>
<LivingPersonName>string</LivingPersonName>
<LivingPersonIdCard>string</LivingPersonIdCard>
<LivingPersonTel>string</LivingPersonTel>
</LivingPerson>
<LivingPerson>
<LivingPersonName>string</LivingPersonName>
<LivingPersonIdCard>string</LivingPersonIdCard>
<LivingPersonTel>string</LivingPersonTel>
</LivingPerson>
</livingPersonList>
其他的可以直接用
SoapObject rpc = new SoapObject(nameSpace, methodName);
//参数
rpc.addProperty("houseAddress", "dddd");
方法构造。
但是不知道livingPersonList 这组数据怎么构造:
请高手指点一下,谢谢!
...全文
38 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧