WSO2-ESB How to save the whole SOAP Envelope into

2019-07-06 00:38发布

I am saving the message body into a property with the following syntax

 <property name="MyBody" expression="$body" scope="default" type="STRING"/>

as described at https://docs.wso2.com/display/ESB481/Synapse+XPath+Variables#SynapseXPathVariables-$axis2

I was wondering whether there is a way to save the whole envelope at once, not only the header or the body. I could not find any information about it.

Thank you!

2条回答
唯我独甜
2楼-- · 2019-07-06 01:25
<property name="FirstBodyContent" expression="$body/*[1]" type="OM"/>

We can use this Above line for getting first Element of soap:Body

for Getting Body Content use this below line

<property name="BodyContent" expression="$body" type="OM"/>
查看更多
一夜七次
3楼-- · 2019-07-06 01:30

You can utilize the enrich mediator available in the wso2 ESB. Simply you mention as this and preserve your envelop in the "INIT_MSG" property and later you use it.

<enrich>
        <source type="envelope" clone="true"/>
        <target type="property" property="INIT_MSG"/>
</enrich>
查看更多
登录 后发表回答