This sequence is for writing one specific field value into the file.Problem is we only need content,but using xml label is coming and if I use json then value comes into {}`
{$1}
</format>
<args>
<arg evaluator="xml" expression="//FieldValue"/>
</args>
</payloadFactory>
<property name="OUT_ONLY" value="true"/>
<send>
<endpoint name="FileEpr">`target path`
<address uri="vfs:file://D:/Documents/File/out"/>
</endpoint>
</send>
</Sequence>
1.My question is is there any way to write content only?? 2.In this code I used payload factory,is there any way to write into a file using some other mediator?? Please suggest how yo write into a file without using payload factory
You can use whatever method to apply your transformation : payloadFactory, javascript, XSL, custom class, ...
If what you call "content only" is a way to produce a text file, you must generate (with your transformation) a xml message with a soap body like this :
Sample with payloadFactory :
Before send mediator, think to specify message format so that WSO2 ESB can choose the right message formatter :