1

我无法将传入的 SOAP Payload 转换为 JSON 并将其发送到 Endpoint。

有人这样做过吗?如果是这样,你能分享一下你是怎么做的吗?

先感谢您。

4

2 回答 2

0

You can use XSLT transformation to achieve the task. Here is a sample which will guide you.

于 2012-10-27T02:20:34.003 回答
0

使用 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" />
于 2016-02-02T19:50:31.823 回答