Write DocType content to a file

Hi,
I have a simple question : is there a flow service that can create/write a file (in a directory) from a Document Type…I didn’t find anything in the “Built-in_Services” Doc, but I’d like to be sure before writing a Java Service (and using java.io package).
Thanks, Charles de Saint Andre.

The convertToString services (wm.b2b.edi:convertToString and pub.flatFile:convertToString) allow you to name a flat file schema and an output file name. This will convert an IS document type to a string and save it to a file. If you’d rather go the Java route, there’s an example in the Samples package (sample.IO.test:writeToFile).

Tim

De,

If it is a xml documenttype then make use of DocumentToXMLString and later as Tim mentioned use the sample.IO.test:writeToFile (service located in the WmSamples package).

HTH,
RMG

OK, thanks to both of you !

But, when I’m using the convertToString service, the output string remains empty…does anyone experiment this kind of problem and know how to fix it ?

The flat file structure to create is simple : a record is composed of seven fields delimited by ; and a new record is identified by a “newline”. I tried other values to fix the problem : “carriage return”, “carriage return line field”.

I have created a dictionnary (one record definition and seven fields definition), then the FF shema, created by setting dictionnary reference…

De,

Are you seeing any parsing errors using convertToString?Try to test the FFSchema in the FlatFile panel itself and so that you will find the bug.Also make sure the RecordDefinition with respect to the flatfile is recognizing.

HTH,
RMG

Oups…I mean, there is a space before each line.