我使用WSO2 ESB和DDS制作API并最终获得此响应。如何通过使用脚本介体进行一些编辑来处理从XML到JSON的响应?
MainActivity.mDashboardFragment.setTopSellersListView(mProductAdapter);
我想要像这样的结果
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelopexmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body>
<employeeCollection xmlns="http://employee.us.wso2.com">
<employee>
<EmployeeID>17</EmployeeID>
<FirstName>jak</FirstName>
<LastName>123</LastName>
<Team>ok</Team>
</employee>
<employee>
<EmployeeID>18</EmployeeID>
<FirstName>jak</FirstName>
<LastName>123</LastName>
<Team>ok</Team>
</employee>
<employee>
<EmployeeID>19</EmployeeID>
<FirstName>jak</FirstName>
<LastName>123</LastName>
<Team>ok</Team>
</employee>
</employeeCollection>
答案 0 :(得分:-1)
您可以参考以下其中一项,
http://abeykoon.blogspot.com/2015/03/wso2-esb-convert-xml-to-json.html http://tryitnw.blogspot.com/2014/11/wso2-esb-how-to-convert-xml-to-json.html https://docs.wso2.com/display/ESB481/Sample+441%3A+Converting+JSON+to+XML+Using+JavaScript https://docs.wso2.com/display/ESB481/PayloadFactory+Mediator