cancel
Showing results for 
Search instead for 
Did you mean: 

Codepage Problem RFC to SOAP

former_member198060
Participant
0 Kudos

Hello together,

I have a problem with a RFC to SOAP scenario on PI 7.1 and hope you can help me to solve it.

The scenario is as following:

I have two backend systems with customer data, one is an old 4.6 Multi codepage system, the other one is a new ECC6 unicode system. I want to extract the data from a specific table from both systems via RFC adapter of PI.

The process is triggered by a synchronous SOAP call.

For the Unicode backend system everything works as expected, but the payload from the 4.6 system has character issues. I tried to solve it by writing an adaptermodule for the 4.6 RFC CC which does the something like this:


// get Payload
XMLPayload payload = msg.getDocument();

// Convert payload using the String method
byte[] payloadBytes = payload.getContent();
String convertedPayload = new String(payloadBytes, "ISO-8859-2");
payload.setText(convertedPayload);

For ISO-8859-7 (Greece) or ISO-8859-9 (Turkey) this seems to work, but for Eastern European countries I have wrong characters. Codepages with codepage probems are for example ISO-8859-2 or ISO-8859-5.

I originally set the logon language for the 4.6 RFC CC to EN, does this cause problems? I also tried to set it to SL for slovenia, but still the payload is not converted correctly.

Do you have a hint as to what I am doing wrong and how to solve this problem?

Best Regards,

Peter

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member198060
Participant
0 Kudos

Anybody an idea that I could try on the weekend?

Former Member
0 Kudos

Hi,

Most of the times UTF-8 will solve these code page issues...try using that. if that does not help, then you might want to change your language in the RFC destination that you are using to connect to the system or even better change the language in the channel that you are using. You might not require any other changes like manual code page change etc...

Let me know if this doesn't help.

Cheers,

Sarath.

former_member198060
Participant
0 Kudos

Hello Sarath,

Thank you for your reply!

If by UTF-8 you mean to use UTF-8 as the codepage when creating the String, that's not working either.

I also tried to change the logon language of the RFC CC I am using, but this doesn't seem to make any difference to the payload.

Actually, I just saw I made a mistake with the coding I posted.

This is how the coding really looks like:


// get Payload
XMLPayload payload = msg.getDocument();
 
// get Text
String text = payload.getText();

// Convert payload using the String method
byte[] payloadBytes = text.getBytes();
String convertedPayload = new String(payloadBytes, "ISO-8859-2");
payload.setText(convertedPayload);

Best Regards,

Peter

Edited by: Peter Chezowitch on Feb 1, 2010 12:44 PM