我无法将传入的 SOAP Payload 转换为 JSON 并将其发送到 Endpoint。
有人这样做过吗?如果是这样,你能分享一下你是怎么做的吗?
先感谢您。
我无法将传入的 SOAP Payload 转换为 JSON 并将其发送到 Endpoint。
有人这样做过吗?如果是这样,你能分享一下你是怎么做的吗?
先感谢您。
You can use XSLT transformation to achieve the task. Here is a sample which will guide you.
使用 payloadFactory 调解器。 https://docs.wso2.com/display/ESB481/PayloadFactory+Mediator
您必须添加以下行才能将 XML 有效负载转换为 JSON
<property name="messageType" value="application/json" scope="axis2" />
下面的一些示例。
<payloadFactory media-type="json">
<format>
{
"userIdentifier": {
"id": "$1"
}
}
</format>
<args>
<arg expression="get-property('uri.var.id')"></arg>
</args>
</payloadFactory>
<property name="messageType" value="application/json" scope="axis2" />