cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove special char

former_member229036
Participant
0 Kudos

Dear Guru;

my scenario is abap proxy to jdbc async. and Error occured with the following special char

when executing application mapping program com/sap/xi/tf/_MM_JM_Remove_ECC2LEGACY_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Character reference "&#x10" is an invalid XML character.

i am trying to make java mapping to solve it,  but i realized that there is nothing to do in java mapping

because error on the following 3 step  , it seems to be not reading inputStream with '&#x10'.

how can i do with this issue ?

Ready to Java mapping

1. Document Builder Factory Created

2. Document Builder Created

[Fatal Error] :5:198: reference char "&#

com.sap.aii.mapping.api.StreamTransformationException: reference char "&#

at JM_Remove_Send.execute(JM_Remove_Send.java:224)

at JM_Remove_Send.main(JM_Remove_Send.java:71)

public void execute(InputStream inputStream, OutputStream outputStream)
   throws StreamTransformationException {

  System.out.println("Ready to Java mapping");

   try {
 
   //------------------------- 1. step --------------------------------//
   // create a DOM parser and parse input to create document tree


   DocumentBuilderFactory factory =
   DocumentBuilderFactory.newInstance();
   System.out.println("1. Document Builder Factory Created");
 

  //------------------------- 2. step --------------------------------//
   DocumentBuilder builder = factory.newDocumentBuilder();
   System.out.println("2. Document Builder Created");
 

  //------------------------- 3. step --------------------------------//
   Document doc = builder.parse(inputStream);
   System.out.println("3. Document Created");

please help me.

thanks you in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

RaghuVamseedhar
Active Contributor
0 Kudos

David,

First we need to identify the special character.

1) Download the XML before the message mapping. Right click on payload, download and save file with .txt extension.

2) Open that file with foxe editor.

3) Please select the special character in foxe and right click 'char Unicode'.

4) Please post the screenshot here, special character in foxe.

iaki_vila
Active Contributor
0 Kudos

Hi David,

If you use the DOM parser in your java mapping you will get the same exception that in the message mapping, you have to deal with the payload like byte stream. Check this document

Regards.

sewoon_oh
Explorer
0 Kudos

If possible, I think special charaters are should be removed by sender ERP system and removed easily in ABAP source level.