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

Reply via email to