cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Sender + us-ascii

Former Member
0 Kudos

Hi Experts,

I have a scenario with a SOAP Sender adapter in XI 3.0 wich should receive a XML message from a legacy system.

This XML have the us-ascii encoding and we are not able to change it.

Our problem is that, when this message reaches the adapter, the XI is trying to change the encoding to UTF-8 (system default). After this conversion, the special characters in the message are not converted correctly. The result is a message with a lot of '?'.

We did try to follow the instructions from SAP note 856597 but the problem was not solved.

Any ideia about how to convert the incoming message to UTF-8 without losing these characters?

Any module we should use?

Accepted Solutions (1)

Accepted Solutions (1)

SudhirT
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Sudhir,

Our URL already ends with "&xmlenc=us-ascii" and the message content is already set to "text/html".

The XML have the encoding "encoding="us-ascii"".

Even after these configurations characters like à and  are not correctly converted.

stefan_grube
Active Contributor
0 Kudos

Even after these configurations characters like à and  are not correctly converted.

Those characters are not part of US-ASCII. So your input XML is corrupt.

There is no need to do a conversion from US-ASCII to UTF-8 as every character in US-ASCII has the same code in UTF-8.

But when you have characters which are not part of US-ASCII, then of course you cannot have a proper result.

When you say you cannot change this, then you are in a bad situation. You have invalid data and need to repair them before you continue.

Former Member
0 Kudos

Hi Stefan,

I didn't understand this part:

"Those characters are not part of US-ASCII. So your input XML is corrupt."

The characters "ã" and "á" are stored in the database, once the system front-end shows them correctly.

If they are not supported, how are they stored?

stefan_grube
Active Contributor
0 Kudos

The characters "ã" and "á" are stored in the database, once the system front-end shows them correctly.

If they are not supported, how are they stored?

Not the characters in the database are corrupt, but the XML.

When you have an XML header stating that the encoding is us-ascii, then no values are allowed which do not belong to US-ASCII.

So your XML should have encoding either ISO-8895-1 or UTF-8.

But you said you cannot change it, so you are lost.

Former Member
0 Kudos

Totally lost I can say.

I am talking to our database experts.

Thanks for the help.

stefan_grube
Active Contributor
0 Kudos

maybe you show them this page from wikipedia:

http://en.wikipedia.org/wiki/ASCII

Standard for SOAP is using UTF-8 which includes any character.

So you should try to change the encoding at sender side.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

Thanks for the help.

We changed the archtecture and now we are using JDBC. It solved our problem without extra configurations.

Former Member
0 Kudos

The modules "AF Text Codepage Conversion Module" and "AF XML Anonymizer Module" also did not work for special characters.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

One solution is use java mapping and convert the incoming message to UTF-8 as below ..

try{
String string = "input string here";
byte[] utf8 = string.getBytes("UTF-8");
//The below line to convert into string
//String utfstring = new String(utf8);
}catch(Exception e){

}

Former Member
0 Kudos

Hi Baskar,

I tried to convert through an user defined function, but the problem was not solved. I believe is because the message arrives at the integration engine with a bad conversion to UTF-8 made by the adapter engine.

Is there anyway to avoid this conversion?