本文介绍了在java中解析soap响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! SoapObject result =(SoapObject)envelope.getResponse();对象结果= envelope.getResponse(); return result.toString(); reponse soap: < s:body xmlns:s = #unknown > GetPersonnelByPasswordResponse xmlns =http://mycompany.com/PersonnelService> < getpersonnelbypasswordresult z:id = i1 xmlns:a = http://schemas.datacontract.org/2004/07/DataAccessLayer.Modele xmlns:i = http://www.w3.org/2001/XMLSchema-instance xmlns:z = http://schemas.microsoft.com/2003/10/Serialization/ > < zh-CN titykey z:id = i2 xmlns = http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses xmlns:b = http://schemas.datacontract.org/2004/07/System.Data > < b:entitycontainername > DSS_SOTUBIEntities < / b:entitycontainername > < b:entitykeyvalues > < ; b:entitysetname > 人员< ; / b:entitysetname > < / b:entitykeyvalues > < / entitykey > < a:adresse > ariana < / a:adresse > < a:登录 > admin < / a:login > < a:personnelid > 2 < / a:personnelid > < / getpersonnelbypasswordresult > < / s:body > 如何解析java中的soap响应? 类中的解析器dTO public class PersonnelDTO { public String Adresse; public 整数登录; public 整数人员ID;} 解决方案 您可以查看这些是否可以帮助您.. 如何解析肥皂反应? [ ^ ] 如何用Java解析响应SOAP消息 [ ^ ] 在你的java中添加一点肥皂 [ ^ ] 使用解析肥皂响应文档java [ ^ ] SoapObject result = (SoapObject)envelope.getResponse(); Object result = envelope.getResponse(); return result.toString(); reponse soap:<s:body xmlns:s="#unknown"> GetPersonnelByPasswordResponse xmlns="http://mycompany.com/PersonnelService"> <getpersonnelbypasswordresult z:id="i1" xmlns:a="http://schemas.datacontract.org/2004/07/DataAccessLayer.Modele" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/"> <entitykey z:id="i2" xmlns="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses" xmlns:b="http://schemas.datacontract.org/2004/07/System.Data"> <b:entitycontainername>DSS_SOTUBIEntities</b:entitycontainername> <b:entitykeyvalues> <b:entitysetname>Personnels</b:entitysetname> </b:entitykeyvalues></entitykey> <a:adresse>ariana</a:adresse> <a:login>admin</a:login> <a:personnelid>2</a:personnelid> </getpersonnelbypasswordresult> </s:body> how to parse a soap response in java?parser in a class personnelDTOpublic class PersonnelDTO { public String Adresse;public Integer login;public Integer personnelID;} 解决方案 You can view these whether they can help you..How to parse soap response?[^]How to parse the response SOAP message in Java [^]Adding a little soap to your java[^]Parsing soap response document using java[^] 这篇关于在java中解析soap响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-13 07:03