I am trying to confiugre synapse to pick up files for the file system
(vfs) send them to a web services an write the response to the file
syste. I succees this basic scenario. Now I want to write the webservice
response to a file that has the same file name as its origin. The
problem is that I cannot not access the FILE NAME when the webservice is
invoked. So I can I transfer a property to other mediators (e.g. form
inSequence to outSequence).
Here is my configuration:
<proxy name="FileProxy" transports="vfs">
<parameter name="transport.vfs.FileURI">file:///opt/synapse/inbox
</parameter>
<parameter name="transport.vfs.ContentType">application/xml</parameter>
<parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
<parameter name="transport.PollInterval">1</parameter>
<parameter
name="transport.vfs.MoveAfterProcess">file:///opt/synapse/processed
</parameter>
<parameter
name="transport.vfs.MoveAfterFailure">file:///opt/synapse/failed
</parameter>
<parameter name="transport.vfs.ActionAfterProcess">DELETE</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter
name="transport.vfs.MoveTimestampFormat">yyMMddHHmmss</parameter>
<target>
<inSequence>
<log level="custom">
<property name="filename" expression="get-property('transport',
'FILE_NAME')" /><property name="transport.vfs.ReplyFileName"
</log>
<send>
<endpoint key="soapService"></endpoint>
</send>
</inSequence>
<outSequence>
<property name="transport.vfs.ReplyFileName"
expression="fn:concat(get-property('SYSTEM_DATE', 'yyMMddHHmmss') ,
'-',
get-property('????', '??? ref to FILE???'), '.xml')"
scope="transport" />
<send>
<endpoint>
<address uri="vfs:file:///opt/synapse/outbox" />
</endpoint>
</send>
</outSequence>
</target>
</proxy>
Best Regard, Niek Palm
ÿþD i t b e r i c h t i s v e r t r o u w e l i j k e n k a n g e h e i m e i n f o r m a t i e b e v a t t e n e n k e l