Encoding

[FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]Hi All,
I am facing an issue in WM developer (Java Service) with encoding format while writing a string into a file using a Java Service. Input XML file data is in “ISO-8859-1” encoding format. I am using XMLStringToXMLNode and XMLNodeToDocument to convert it IData using a document type. This has been converted to String using “convertToString”. Upto this it is fine and I am able to see the string has proper ISO-8859-1 formatted data. But when I try to write this string to a file using a java service, the out put file is written in UTF-8 format. I believe java service takes the defaulted format which is UTF-8. I searched some of the forums and tried changing the format using OutputStreamWriter in java service. Even then it is not working. I still see the output file in UTF-8 format where there are some high order characters.
Is there anyway I can change the encoding format either in Java service or in webMethods?

Thanks,
Kumar
[/size][/font][/SIZE][/FONT]

[FONT=Arial][SIZE=2]In the call to pub.flatFile:convertToString specify returnAsBytes=true and Encoding=ISO8859-1. Then pass the byte array to a service that writes the bytes to a file. Or just provide the filename to convertToString and it will write the file for you.

Can you share the code of your Java service so we can see what it is doing wrt encoding?
[/SIZE][/FONT]