简体   繁体   中英

logger print null but echo print message in mule flow

I am iterating xml in foreach. Echo is printing correct message but logger is print null.

<foreach collection="#[xpath('//xmlsoap/soap/soapenv:Envelope')]"
            doc:name="For Each">
            <echo-component />
            <logger level="INFO" category="ProTSP Logger" message="#[payload]"
            doc:name="Logger" />
        </foreach>

在此处输入图片说明

I resolved my problem using dom to xml transformer.

<foreach collection="#[xpath('//xmlsoap/soap/soapenv:Envelope')]"
            doc:name="For Each">

            <echo-component doc:name="Echo"/>
            <mulexml:dom-to-xml-transformer doc:name="DOM to XML"/>



            <logger level="INFO" category="ProTSP Logger" message="#[payload]"
                doc:name="Logger" />
        </foreach>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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