webservice消息转化问题

qq_27907603 2016-11-17 04:37:15
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<m:cardSerialResponse xmlns:m="http://service.cardapp.linkage.com">
<result xmlns:n1="java:com.linkage.cardapp.cardpay" xsi:type="n1:CardSerialResp">
<createSerial xsi:type="xsd:string">20161117142928952717170699</createSerial>
<message xsi:type="xsd:string">接口调用成功!</message>
<operResult xsi:type="xsd:string">0</operResult>
</result>
</m:cardSerialResponse>
</env:Body>
</env:Envelope>

如上,我通过webservice(Http+XML)协议调用返回的消息,我现在想要把他转为json格式然后取出里面的值,求大神赐教怎么转化。
...全文
174 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
I,Frankenstein 2016-11-18
  • 打赏
  • 举报
回复
看下这个,http://hanyi366.iteye.com/blog/1162365,其实也可以自己写的,读取xml的内容,封装成map,利用一些jar包toJson转换下。
qq_27907603 2016-11-18
  • 打赏
  • 举报
回复
来人帮忙看下啊。

50,526

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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