I think you can use enrich mediator for your use case. eg:- <enrich> <source type="body"/> <target type="property" property="REQUEST_PAYLOAD"/> </enrich>
<enrich> <source clone="true" property="REQUEST_PAYLOAD" type="property"> <target action="replace" type="body"/> </enrich> On Thu, Jun 18, 2015 at 9:43 AM, Madhuranga Bandara <madhura...@wso2.com> wrote: > Hi, > > get-property() will get values stored in the registry. > If you are using this multiple times. > I suggest method one is better. > > > > > *Madhuranga Sampath Bandara* > Software Engineer > > WSO2, Inc.;http://wso2.com/ > <http://www.google.com/url?q=http%3A%2F%2Fwso2.com%2F&sa=D&sntz=1&usg=AFQjCNGJuLRux6KkJwXKVUCYOtEsNCmIAQ> > lean.enterprise.middleware > Mobile: +94722241065 > > On Wed, Jun 17, 2015 at 10:01 PM, Hasintha Indrajee <hasin...@wso2.com> > wrote: > >> Hi all, >> >> Following are two approaches which I can use to create a payload using a >> payload factory. >> >> >> 1) Just replace the body with xml content >> >> <payloadFactory> >> <format> >> <m:checkpriceresponse xmlns:m="http://services.samples/xsd"> >> <m:code>$1</m:code> >> <m:price>$2</m:price> >> </m:checkpriceresponse> >> </format> >> <args> >> <!-- some args go here--> >> </arg> >> >> </payloadFactory> >> >> 2) Create an *OM type* property which has the request body (This is done >> only once) and embed it in content of the body. >> >> <payloadFactory> >> <format> >> $1 >> </format> >> <args> >> <arg expression="get-property('request')" xmlns:m0=" >> http://services.samples/xsd"/> >> </arg> >> >> </payloadFactory> >> >> >> Suppose I am re-calling these sequences multiple times. Should there be >> any performance differences in these two cases ? even if we have an OM >> type payload embedded, does it try to parse the payload again ? >> >> -- >> Hasintha Indrajee >> Software Engineer >> WSO2, Inc. >> Mobile:+94 771892453 >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Best Regards, Malaka Silva Senior Tech Lead M: +94 777 219 791 Tel : 94 11 214 5345 Fax :94 11 2145300 Skype : malaka.sampath.silva LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 Blog : http://mrmalakasilva.blogspot.com/ WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/ http://www.wso2.com/about/team/malaka-silva/ <http://wso2.com/about/team/malaka-silva/> Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev