Showing posts with label filewrite. Show all posts
Showing posts with label filewrite. Show all posts

Tuesday, May 11, 2010

OSB: how to write something to a file

create  a BS,
type Messaging Service,
Request Message Type = text,
Response Message Type = none,
Transport Protocol. File
end point URI: add your destination directory

The payload will be written to a file with a name like this:
8777563012195256358--6573da2d.12881bdd24b.-7fbe

If you want to set the filename (which sounds reasonable) should set the transport headers :
<file:filePath      xmlns:file="http://www.bea.com/wli/sb/transports/file">C:\temp\files\peppolino.txt</file:filePath>


The response document will be empty, and the response metadata will be

 0
 utf-8
 
 C:\geo\filewriterout\1397675502822972061-34dc1924.129e5f8c47d.-7fc6
 
 








Since the input is specified as text, it can be anything, not necessarily XML.

To set the file name, in the Route node use the option "Set Transport Headers for[ Outbound Request ]" and selected Pass all Headers through Pipeline in the calling proxy.