Hello everybody, 

is it possible using the file sender component without to create an
xml-file? I just need a simple file without any xml specific tags. I always
get a file like:

<?xml version="1.0" encoding="UTF-8"?>
<hello>myContent
</hello>

but I just want a file like this:

myContent


I'm calling the file sender with the Client API like this:

InOnly exchange = client.createInOnlyExchange();

NormalizedMessage message = exchange.getInMessage();
message.setProperty("name", "James");
message.setContent(new StreamSource(new
StringReader("<hello>myContent</hello>")));

QName service = new QName("http://servicemix.org/file/";, "fileSender");
exchange.setService(service);
client.send(exchange);

my file sender looks like this:

 <file:sender service="fH:fileWriter" endpoint="fileWriter"
directory="file:Output/">
        <file:marshaler>
                <sm:defaultFileMarshaler>
                        <sm:fileName>
                        <sm:xpathString xpath="concat($name, '.txt')"/>
                        </sm:fileName>
                </sm:defaultFileMarshaler>
        </file:marshaler>
</file:sender>

The problem is that I can't use a message content like this:

message.setContent(new StreamSource(new StringReader(myContent)));

because then I'm getting an exception.

greets Goldi






-- 
View this message in context: 
http://www.nabble.com/Using-File-Sender-Component%21-tf3714475s12049.html#a10390543
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to