简体   繁体   English

WSO2 ESB无法响应json消息

[英]WSO2 ESB can not response json message

I have a service response is : 我的服务响应是:

<Response>
    <BackUrl>www.hao123.com</url>
    <resultCode>0</resultCode>
</Response>

I set messageType:"application/json" . 我设置messageType:"application/json" The response is: 响应为:

{Response:{"BackUrl":"coship.com","resultCode":"0";}}.

But I need transform this message to a json string like: 但我需要将此消息转换为json字符串,例如:

{"BackUrl":"http://www.coship.com","resultCode":"0"}

How ro remove node "Response". 如何删除节点“ Response”。 I tried to use script mc.setPayloadJSON in ESB 4.5.1. 我尝试在ESB 4.5.1中使用脚本mc.setPayloadJSON But errors happened. 但是发生了错误。

https://wso2.org/jira/browse/ESBJAVA-1618?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs

Anyone can help me? 有人可以帮助我吗? Thank you very much. 非常感谢你。

There is an issue reported as mentioned, and it is not resolved yet. 如上所述,报告了一个问题,但尚未解决。 But, you can set messgae type as 但是,您可以将messgae类型设置为

<property name="messageType" value="application/json" scope="axis2"/>  

and check? 并检查?

here is a post which may useful to you 这是对您可能有用的帖子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM