VFS: how to configure synapse to use input file name for the output file name

View: New views
8 Messages — Rating Filter:   Alert me  

VFS: how to configure synapse to use input file name for the output file name

by Niek Palm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

ÿþDit bericht is vertrouwelijk en kan geheime informatie bevatten enkel
bestemd voor de geadresseerde. Indien dit bericht niet voor u is bestemd,
verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te
vernietigen.
Aangezien de integriteit van het bericht niet veilig gesteld is middels
verzending via internet, kan Atos Origin niet aansprakelijk worden gehouden
voor de inhoud daarvan.
Hoewel wij ons inspannen een virusvrij netwerk te hanteren, geven
wij geen enkele garantie dat dit bericht virusvrij is, noch aanvaarden wij
enige aansprakelijkheid voor de mogelijke aanwezigheid van een virus in dit
bericht.
 
Op al onze rechtsverhoudingen, aanbiedingen en overeenkomsten waaronder
Atos Origin goederen en/of diensten levert zijn met uitsluiting van alle
andere voorwaarden de Leveringsvoorwaarden van Atos Origin van toepassing.
Deze worden u op aanvraag direct kosteloos toegezonden.
 
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.
 
On all offers and agreements under which Atos Origin supplies goods and/or
services of whatever nature, the Terms of Delivery from Atos Origin
exclusively apply.
The Terms of Delivery shall be promptly submitted to you on your request.
 
Atos Origin Nederland B.V. / Utrecht
KvK Utrecht 30132762

Re: VFS: how to configure synapse to use input file name for the output file name

by Ruwan Linton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <niek.palm@...>

> 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
>



--
Ruwan Linton
Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: ruwan@...; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

Re: VFS: how to configure synapse to use input file name for the output file name

by Asankha C. Perera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <niek.palm@...>
>
>  
>> 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





Re: VFS: how to configure synapse to use input file name for the output file name

by Niek Palm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Asankha,

Thank you for you hint, unfortunately this one of the things I have
tried and it is not working. The get-property('filename') returns an
empty or null as result. The synapse log gives the following error:

INFO TimeoutHandler This engine will expire all callbacks after : 86400
seconds, irrespective of the timeout action, after the specified or
optional timeout
2009-07-22 09:53:35,389 [127.0.1.1-niek-laptop] [HttpClientWorker-1]
WARN SynapseConfigUtils IO Error reading from
URL : /<dirs>/./repository/FileNamejava.io.FileNotFoundException: /<dirs>/./repository/FileName (No such file or directory)

It seem getting the property results in some IO action....

I am not sure if I correct but to me it seems I have to deal with in /
out to the file system and another in / out from web service to fs.

Maybe you have a working example?

Best Regards, Niek Palm

>
> 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 <niek.palm@...>
> >
> >  
> >> 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
> >>    
>

ÿþDit bericht is vertrouwelijk en kan geheime informatie bevatten enkel
bestemd voor de geadresseerde. Indien dit bericht niet voor u is bestemd,
verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te
vernietigen.
Aangezien de integriteit van het bericht niet veilig gesteld is middels
verzending via internet, kan Atos Origin niet aansprakelijk worden gehouden
voor de inhoud daarvan.
Hoewel wij ons inspannen een virusvrij netwerk te hanteren, geven
wij geen enkele garantie dat dit bericht virusvrij is, noch aanvaarden wij
enige aansprakelijkheid voor de mogelijke aanwezigheid van een virus in dit
bericht.
 
Op al onze rechtsverhoudingen, aanbiedingen en overeenkomsten waaronder
Atos Origin goederen en/of diensten levert zijn met uitsluiting van alle
andere voorwaarden de Leveringsvoorwaarden van Atos Origin van toepassing.
Deze worden u op aanvraag direct kosteloos toegezonden.
 
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.
 
On all offers and agreements under which Atos Origin supplies goods and/or
services of whatever nature, the Terms of Delivery from Atos Origin
exclusively apply.
The Terms of Delivery shall be promptly submitted to you on your request.
 
Atos Origin Nederland B.V. / Utrecht
KvK Utrecht 30132762

Re: VFS: how to configure synapse to use input file name for the output file name

by Asankha C. Perera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Niek

Well if your pasted configuration seems wrong in XML too :) ? .. anyway
trick is to set a property 'filename' in the inSequence, and set it to
the FILE_NAME property from the transport on reading. The response is
then saved in the outSequence using the 'filename' thus saved.

Here is a working config created from sample 254
(http://synapse.apache.org/Synapse_Samples.html#Sample254)

cheers
asankha
> ...
>>>>        <log level="custom">
>>>>        <property name="filename" expression="get-property('transport',
>>>> 'FILE_NAME')" /><property name="transport.vfs.ReplyFileName"
>>>>        </log>
>>>>        
...

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

http://esbmagic.blogspot.com





<!--
  ~  Licensed to the Apache Software Foundation (ASF) under one
  ~  or more contributor license agreements.  See the NOTICE file
  ~  distributed with this work for additional information
  ~  regarding copyright ownership.  The ASF licenses this file
  ~  to you under the Apache License, Version 2.0 (the
  ~  "License"); you may not use this file except in compliance
  ~  with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing,
  ~  software distributed under the License is distributed on an
  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~  KIND, either express or implied.  See the License for the
  ~  specific language governing permissions and limitations
  ~  under the License.
  -->

<!-- Using the  file system as transport medium using VFS transport listener and sender -->
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <proxy name="StockQuoteProxy" transports="vfs">
        <parameter name="transport.vfs.FileURI">file:///tmp/in</parameter> <!--CHANGE-->
        <parameter name="transport.vfs.ContentType">text/xml</parameter>
        <parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
        <parameter name="transport.PollInterval">15</parameter>
        <parameter name="transport.vfs.MoveAfterProcess">file:///tmp/out</parameter> <!--CHANGE-->
        <parameter name="transport.vfs.MoveAfterFailure">file:///tmp/out</parameter> <!--CHANGE-->
        <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
        <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>

        <target>
            <inSequence>
                <property name="filename" expression="get-property('transport','FILE_NAME')"/>
                <log level="full">
                        <property name="file name" expression="get-property('filename')"/>
                </log>
            </inSequence>

            <endpoint>
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>

            <outSequence>
                <property action="set" name="OUT_ONLY" value="true"/>
                <property name="transport.vfs.ReplyFileName" expression="get-property('filename')" scope="transport"/>
                <send>
                    <endpoint>
                        <address uri="vfs:file:///tmp"/> <!--CHANGE-->
                    </endpoint>
                </send>
            </outSequence>
        </target>
    </proxy>
</definitions>

Re: VFS: how to configure synapse to use input file name for the output file name

by Niek Palm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Asankha,

Thank you again for the quick response. I have also tried this but thr problem seems that properties set in the inSequence are not available in the outSequence. I have also tried other scopes then transport (which is the default). The XML in the previous mail could be invalid since I removed non relevant data.

<inSequence>
<property action='set' name="filename"
expression="fn:concat(get-property('SYSTEM_DATE', 'yyMMddHHmmss') ,
'-', get-property('transport', 'FILE_NAME'), '.xml')"
scope='transport' />
<log level="custom">
<property name="show-name" expression="get-property('transport','filename')" />
</log>
<send>
<endpoint key="soapService"></endpoint>
</send>
</inSequence>


So first I compose the name and assign it to the property filename. Next I write the variable to the log. Now I am sure the variable is set correctly.

<outSequence>
<log level="custom">
<property name="-filename-" expression="get-property('transport', 'filename')" />
</log>

<property name="transport.vfs.ReplyFileName"
expression="get-property('filename', 'transport')" />

<send>
<endpoint>
<address uri="vfs:file:///opt." />
</endpoint>
</send>
</outSequence>


But noe I don't see the file name in de logging, I see:
2009-07-22 10:52:19,704 [127.0.1.1-niek-laptop] [HttpClientWorker-1]  INFO LogMediator -filename- = null

So it seems the properties are not shared between mediators (inSequence / outSequence).

I hope you have another hint.

Regards, Niek

On Wed, 2009-07-22 at 13:57 +0530, Asankha C. Perera wrote:
Hi Niek

Well if your pasted configuration seems wrong in XML too :) ? .. anyway
trick is to set a property 'filename' in the inSequence, and set it to
the FILE_NAME property from the transport on reading. The response is
then saved in the outSequence using the 'filename' thus saved.

Here is a working config created from sample 254
(http://synapse.apache.org/Synapse_Samples.html#Sample254)

cheers
asankha
> ...
>>>>        <log level="custom">
>>>>        <property name="filename" expression="get-property('transport',
>>>> 'FILE_NAME')" /><property name="transport.vfs.ReplyFileName"
>>>>        </log>
>>>>         
...


ÿþDit bericht is vertrouwelijk en kan geheime informatie bevatten enkel
bestemd voor de geadresseerde. Indien dit bericht niet voor u is bestemd,
verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te
vernietigen.
Aangezien de integriteit van het bericht niet veilig gesteld is middels
verzending via internet, kan Atos Origin niet aansprakelijk worden gehouden
voor de inhoud daarvan.
Hoewel wij ons inspannen een virusvrij netwerk te hanteren, geven
wij geen enkele garantie dat dit bericht virusvrij is, noch aanvaarden wij
enige aansprakelijkheid voor de mogelijke aanwezigheid van een virus in dit
bericht.
 
Op al onze rechtsverhoudingen, aanbiedingen en overeenkomsten waaronder
Atos Origin goederen en/of diensten levert zijn met uitsluiting van alle
andere voorwaarden de Leveringsvoorwaarden van Atos Origin van toepassing.
Deze worden u op aanvraag direct kosteloos toegezonden.
 
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.
 
On all offers and agreements under which Atos Origin supplies goods and/or
services of whatever nature, the Terms of Delivery from Atos Origin
exclusively apply.
The Terms of Delivery shall be promptly submitted to you on your request.
 
Atos Origin Nederland B.V. / Utrecht
KvK Utrecht 30132762

Re: VFS: how to configure synapse to use input file name for the output file name

by Asankha C. Perera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Niek
> Thank you again for the quick response. I have also tried this but thr
> problem seems that properties set in the inSequence are not available
> in the outSequence
This cant be! I just tested this before I shared the configuration...
Which version of Synapse are you using? I tried with a snapshot from
probably a few weeks back..
> <inSequence>
> <property action='set' name="filename"
> expression="fn:concat(get-property('SYSTEM_DATE', 'yyMMddHHmmss') ,
> '-', get-property('transport', 'FILE_NAME'), '.xml')"
> scope='transport' />
> <log level="custom">
> <property name="show-name"
> expression="get-property('transport','filename')" />
## Don't do this.. if you want to check if the 'filename' property was
set correctly as required to be read in the outSequence, just use
get-property('filename') and drop the transport scope this time..
> So first I compose the name and assign it to the property filename.
> Next I write the variable to the log. Now I am sure the variable is
> set correctly.
Well .. the code is right to set it.. but your reading was faulty..
> <outSequence>
> <log level="custom">
> <property name="-filename-" expression="get-property('transport',
> 'filename')" />
> </log>
This is wrong.. you can share properties only in the default scope - and
thus you will not have the transport scope available during inSequence
in your outSequence
> <property name="transport.vfs.ReplyFileName"
> expression="get-property('filename', 'transport')" />
Make sure to mark this message as OUT_ONLY too as shown in my example

Cheers
asankha

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

http://esbmagic.blogspot.com





Re: VFS: how to configure synapse to use input file name for the output file name

by Niek Palm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Asankha

I am using synapse version 1.2. probably that is the problem. I will
checkout the SNAPSHOT version later today. Leaving the scope in the
get-property function will result in an error:

2009-07-22 12:39:28,178 [-] [vfs-Worker-7]  WARN SynapseConfigUtils IO
Error reading from URL : <dir to
synapse>/./repository/filenamejava.io.FileNotFoundException: <dir to
synapse>/./repository/filename (No such file or directory)

Regard Niek

On Wed, 2009-07-22 at 15:00 +0530, Asankha C. Perera wrote:

> Hi Niek
> > Thank you again for the quick response. I have also tried this but thr
> > problem seems that properties set in the inSequence are not available
> > in the outSequence
> This cant be! I just tested this before I shared the configuration...
> Which version of Synapse are you using? I tried with a snapshot from
> probably a few weeks back..
> > <inSequence>
> > <property action='set' name="filename"
> > expression="fn:concat(get-property('SYSTEM_DATE', 'yyMMddHHmmss') ,
> > '-', get-property('transport', 'FILE_NAME'), '.xml')"
> > scope='transport' />
> > <log level="custom">
> > <property name="show-name"
> > expression="get-property('transport','filename')" />
> ## Don't do this.. if you want to check if the 'filename' property was
> set correctly as required to be read in the outSequence, just use
> get-property('filename') and drop the transport scope this time..
> > So first I compose the name and assign it to the property filename.
> > Next I write the variable to the log. Now I am sure the variable is
> > set correctly.
> Well .. the code is right to set it.. but your reading was faulty..
> > <outSequence>
> > <log level="custom">
> > <property name="-filename-" expression="get-property('transport',
> > 'filename')" />
> > </log>
> This is wrong.. you can share properties only in the default scope - and
> thus you will not have the transport scope available during inSequence
> in your outSequence
> > <property name="transport.vfs.ReplyFileName"
> > expression="get-property('filename', 'transport')" />
> Make sure to mark this message as OUT_ONLY too as shown in my example
>
> Cheers
> asankha
>

ÿþDit bericht is vertrouwelijk en kan geheime informatie bevatten enkel
bestemd voor de geadresseerde. Indien dit bericht niet voor u is bestemd,
verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te
vernietigen.
Aangezien de integriteit van het bericht niet veilig gesteld is middels
verzending via internet, kan Atos Origin niet aansprakelijk worden gehouden
voor de inhoud daarvan.
Hoewel wij ons inspannen een virusvrij netwerk te hanteren, geven
wij geen enkele garantie dat dit bericht virusvrij is, noch aanvaarden wij
enige aansprakelijkheid voor de mogelijke aanwezigheid van een virus in dit
bericht.
 
Op al onze rechtsverhoudingen, aanbiedingen en overeenkomsten waaronder
Atos Origin goederen en/of diensten levert zijn met uitsluiting van alle
andere voorwaarden de Leveringsvoorwaarden van Atos Origin van toepassing.
Deze worden u op aanvraag direct kosteloos toegezonden.
 
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.
 
On all offers and agreements under which Atos Origin supplies goods and/or
services of whatever nature, the Terms of Delivery from Atos Origin
exclusively apply.
The Terms of Delivery shall be promptly submitted to you on your request.
 
Atos Origin Nederland B.V. / Utrecht
KvK Utrecht 30132762