Hi Aman, You can have log level full as like below in order to view the payload before and after hitting the payload factory mediator.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="PayloadFactoryTest" startOnLoad="true" statistics="disable" trace="disable" transports="http,https"> <target> <inSequence> <log level="full"> <property name="where?" value="Payload at the Beginning of the payload factory mediator"/> </log> <payloadFactory description="MyPayload" media-type="xml"> <format> <Deatils> <payload> <Persons> <Names> <A>value</A> <B>value</B> <C>value</C> </Names> </Persons> </payload> </Deatils> </format> <args/> </payloadFactory> <log level="full"> <property name="where?" value="Payload at the After hitting the payload factory mediator"/> </log> <call> <endpoint key="testHTTP"/> </call> <respond/> </inSequence> <outSequence/> <faultSequence/> </target> <description/> </proxy> Also get more information on how to set arguments in payload factory mediator by following the doc[1] [1] https://docs.wso2.com/display/ESB500/PayloadFactory+Mediator Regards, Thivya On Sat, Sep 15, 2018 at 2:44 PM, Amit Gupta <[email protected]> wrote: > Use a custom log, and in expression put as . > . Will print entire envelope > > On Sat, 15 Sep 2018, 14:42 Aman Singh, <[email protected]> wrote: > >> Hi Guys, >> >> I am very new to WSO2. >> I Have used a Payload Factory and I have inserted a simple XML as payload >> in it. How do I print the payload of Payload Factory and view it in console >> using Log Mediator? >> >> My sample code is below:- >> >> <proxy name="PayloadFactoryTest" startOnLoad="true" transports="http >> https" xmlns="http://ws.apache.org/ns/synapse"> >> <target> >> <inSequence> >> <payloadFactory description="MyPayload" media-type="xml"> >> <format> >> <Deatils> >> <payload> >> <Persons> >> <Names> >> <A>value</A> >> <B>value</B> >> <C>value</C> >> </Names> >> </Persons> >> </payload> >> </Deatils> >> </format> >> <args/> >> </payloadFactory> >> </inSequence> >> <outSequence> >> <respond/> >> </outSequence> >> <faultSequence/> >> </target> >> </proxy> >> >> Thank you, >> Aman >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Thivya Mahenthirarasa* *Software Engineer -Support Team | WSO2* *Email: [email protected] <[email protected]>* *Mobile: +94766461966 <http://wso2.com/signature>* *Web: http://wso2.com <http://wso2.com>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
