cancel
Showing results for 
Search instead for 
Did you mean: 

MAPPING - EXCEPTION_DURING_EXECUTE

Former Member
0 Kudos

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 &#65533;x.7&#65533; &#65533;HO&#65533; ret_bancaja.txtm&#65533;1</LINEAS>

</item>

- <item>

<LINEAS>&#65533;0 D&#65533;^&#65533; &#65533;&#65533;&#65533;&#65533;l&#65533;li&#65533; &#65533;&#65533;o&#65533; _;&#65533; t&#65533;W&#65533; &#65533;&#65533; F&#65533;f&#65533;&#65533;y#</LINEAS>

</item>

- <item>

<LINEAS>&#65533;n]&#65533;G&#65533;&#65533;$_&#65533;tO&#65533;&#65533;U&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;z}J PK &#65533;x.7&#65533; &#65533;HO&#65533;</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

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

I realised i was trying to poll . files from a folder in which there was a .txt and a .zip file.

I didnt know that.

Do you think these control characters can come from there?

regards,

david

iaki_vila
Active Contributor
0 Kudos

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

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Answers (0)