on 09-25-2007 5:14 PM
Hi dudes,
My scenario is FTP to RFC.
Sender CC with FCC picks a .txt with multiple lines as:
<i>00000002W 19R9A2077004050510203047801092007EUR
00000001R 19R9A2077094850510001439001092007EUR </i>
However, when the conversion takes place, i face following error :
<i>com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:<b> Invalid char #0x3</b>(:main:, row:5, col:13) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:187) at com.sap.aii.mappingtool.tf3.Transformer.start</i>
If i see request mapping i see the following:
<i> <?xml version="1.0" encoding="utf-8" ?>
- <MT_FTP_SPHIE019>
- <Recordset>
- <item>
<LINEAS>PK �x.7� �HO� ret_bancaja.txtm�1</LINEAS>
</item>
- <item>
<LINEAS>�0 D�^� ����l�li� ��o� _;� t�W� �� F�f��y#</LINEAS>
</item>
- <item>
<LINEAS>�n]�G��$_�tO��U��������z}J PK �x.7� �HO�</LINEAS>
</item>
</Recordset></i>
My question is: Could you guys give me an explanation why this characters may have appear in my Message Type??
I have changed from Binary to Text (utf-8).
bestregards,
david
Hi,
Are you sure that you only use these kind of character?. The error mark that you are using control caracters that XML doesn´t support.
If you want to use an illegal xml characters you could with the type CDATA in the xml like this:
The CDATA interprets like text plane the inside it.
Regards
spanish ***
Hola como pareces castellano parlante solo decirte que utilices una estructura CDATA si vas a tener caracteres extraños.
Regards.
Message was edited by:
Iñaki Vila
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi I was editing the past message. I put:
If you want to use an illegal xml characters you could with the type CDATA in the xml like this:
The CDATA interprets like text plane the inside it.
Rewrite:
If you use zip file, you can use java mapping an unzip the files.
Regards
spanish ***
Hola como pareces castellano parlante solo decirte que utilices una estructura CDATA si vas a tener caracteres extraños. Si tienes archivos ZIP, descomprimelos antes. En 5 minutos te pongo codigo que tengo por ahí.
Regards.
Message was edited by:
Iñaki Vila
import java.util.zip.*;
private OutputStream unZip(InputStream in) throws Exception {
BufferedInputStream bufer = null;
ZipInputStream fzip = new ZipInputStream(in);
ZipEntry zip = (ZipEntry) fzip.getNextEntry();
// Comprueba integridad del fichero zip
if (zip == null) {
return null;
}
bufer = new BufferedInputStream(fzip);
//Pasamos contenido binario a fichero binario
// YOU MUST CHANGE THIS
//DEBES CAMBIAR ESTO PARA PASARLO A TEXTO
OutputStream output = new ByteArrayOutputStream();
byte b[] = new byte[1];
int i = 1;
while (i != -1) {
i = bufer.read(b);
output.write(b);
}
return output;
}
You must change the output to obtain a string. I think you might also use an advance function in an usual mapping.
Hi again,
The only characters i want to exchabge are the one from my first post, only numbers, letters &blank spaces.
So i assume this is not necessary, i will try to test with the .txt and let you know my results.
***********Spanish*************
Si, acertaste. Solo quiero pasar numeros y letras, asi que no hay carateres extraños. Intentare probar con el archivo.txt y a ver qué pasa.
Aunque el NFS me esta dando mucho problemas, ya que aunque dejo el fichero en la carpeta con FILEZILLA, XI no lo coge en todas las ocasiones.
No sabras a que puede deberse esto verdad??
Gracias por adelantado
Saludos
Hi David,
I assume that you are using the File Adpater to obtain the data with FTP. I usually use the java ftp or sftp in a java mapping for more power.
Regards.
SpanisH**
Resumiendo el que el adaptador via ftp de XI nunca me ha convencido y prefiero usar librerias de java en un java mapping ya que asi ademas puedo usar sftp. Si quiere codigo de SFTP te lo puedo dejar. Por cierto pon este problema en ingles que aqui si hay mucha gente que usa el adaptador de XI.
Saludos.
Hi Iñaki,
Yes, you are correct. I would try to implement SSL to use FTPS in the future as well.
Thanks for your import. Right now i am facing another mapping problem so i will explain it in another post.
***Spanish****
Muchas gracias tio, a mi tp me hace excesiva gracia el adaptador este pero bueno, intento pegarme con el. En mi proyecto ademas quieren usar HTTPS y FTPS asi que me tendre que poner tb con el tema de certificados,
Ahora tengo un problemilla del XML parser que voy a poner en otro post, seguro quee s una tontería para los que sabeis bien de esto de mapeos, jeje
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.