Converting LineFeed to CarriageReturnLineFeed in BPEL
Hi,
I have a service where it gets the data in the request and writes the same to the FTP Server (windows), just one-to-one mapping, For one element in the request, there are multiple lines, i.e., they will be having LF (line feed) for each line at the end of line, when the file gets written, i need to have CRLF for all of those lines in that element.
when i do the transformation which assigns the request data to the ftpinput variable, if i test that process..,i am getting CR for each of those repeating lines in that element...
for that element, in the xsl, i am using this xpath ......
translate(/ink:DataService/ink:Data/ns1:serv,'amphashxA;','amphashxD;')
replace amphash by &#
open the file through Notepad++, go to view, show symbol, select "show end of line"...
if you do that, you will be seeing the CR, LF, or CRLF characters at the end of the line based on the OS...
i am just copying the source data to target, source is unix, target ftp server is windows, right, so i should be able to conver the unix new line representation (LF) to target ftp server windows representation (CRLF)...
if you can see this, you will understand much better...
http://georgie-soablog.blogspot.com/2009/06/ftp-adapter-issues-with-eol-in-bpelesb.html
If you have selected that option in Notepad++,
source:
<ns1:data>first line <b>LF</b>
second line. <b>LF</b>
third line. <b>LF</b>
</ns1:data>
Target coming as of now:
<ns1:data>first line <b>CR</b>
second line. <b>CR</b>
third line. <b>CR</b>
</ns1:data>
Expected Target:
<ns1:data>first line <b>CRLF</b>
second line. <b>CRLF</b>
third line. <b>CRLF</b>
</ns1:data>
Please help
Naresh