Hi Niek

Forwarding the reply from Ruwan directly to you, since your original
email went into moderation.. so I am assuming you are not subscribed to
have received Ruwan's reply. Please ensure that you subscribe to the
list as per information mentioned in
http://synapse.apache.org/mail-lists.html

cheers
asankha
> Hi Niek,
>
> All the properties of the in path of the message will be there for the out
> path as well. So you can directly use the property name "filename" to
> retrieve the file name at the outSequence.
>
> <property name="transport.vfs.ReplyFileName"
> expression="fn:concat(get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '-',
> get-property('filename'), '.xml')" scope="transport" />
> Hope this helps...
>
> Thanks,
> Ruwan
>
>
> 2009/7/22 Niek Palm <[email protected]>
>
>   
>> 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
>>     

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com




Reply via email to