Hi Richard, You can instead use a sequence like this,
<sequence name="clone_it" trace="disable" xmlns=" http://ws.apache.org/ns/synapse"> <property expression="get-property('To')" name="xto" scope="default" type="STRING"/> <log description="" level="custom"> <property expression="get-property('xto')" name="response"/> </log> <clone continueParent="true"> <target> <sequence> <log description="" level="custom"> <property value="RESPONSE_CLONED" name="response_clone"/> </log> <call> <endpoint> <http method="POST" uri-template="http://10.0.0. 32:9091/yd"/> </endpoint> </call> </sequence> </target> </clone> </sequence> On Thu, Dec 14, 2017 at 2:16 AM, Richard Páleník <[email protected]> wrote: > Hello team, > > I need to process outgoing response from an API in an ERP application but > leave the original message sent to the requestor without delay. > > I am trying to put clone mediator in use, but it does not seem to work. > Here is the setup: > > <?xml version="1.0" encoding="UTF-8"?> > > <sequence name="clone_it" trace="disable" xmlns="http://ws.apache.org/ > ns/synapse"> > > <property expression="get-property('To')" name="xto" scope="default" > type="STRING"/> > > <log description="" level="custom"> > > <property expression="get-property('xto')" name="response"/> > > </log> > > <clone continueParent="true"> > > <target> > > <sequence/> > > <endpoint> > > <http method="post" uri-template="http://10.0.0.32:9091/yd > "/> > > </endpoint> > > </target> > > </clone> > > </sequence> > > > The logging works, the original message goes through but no clone seems to > be generated/sent (no error logged). I tried to use callout mediator > instead and it works - but does not work for my purpose because it waits > for a result and also it attaches the request context (path) to the > endpoint path. > > Can you help to unlock the problem with clone mediator? or suggest other > alternative for this scenario? Many thanks. > > Richard > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Shazni Nazeer Mob : +94 777737331 LinkedIn : http://lk.linkedin.com/in/shazninazeer Blogs : https://medium.com/@mshazninazeer http://shazninazeer.blogspot.com <http://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
