cancel
Showing results for 
Search instead for 
Did you mean: 

Special characters in sender soap adapter provoke HTTP 500 error

Former Member
0 Kudos

Hi,

SAP R3 is sending a SOAP message to PI through SOAP adapter.

When the payload does NOT contain german characters like ü, it works fine.

However, when the payload DOES contain special characters, the SOAP adapter replies with an HTTP 500 code error.

If I use SoapUI to send the soap message, and setting UTF-8 as the encoding in the program options, it will go through fine. If I change to ISO-8859-1 it will fail.

I'm thinking in two options:

- Make sure that SAP R3 sends the message in UTF-8 format (I think this is happening currently), as if SoapUI works, then probably R3 is not using UTF-8.

- Force the adapter to use UTF-8. Is this possible? In the sender SOAP adapter I've added AF_Modules/MessageTransformBean (type local EB), and then Transform.ContentType for parameter name and --> text/plain;charset=utf-8 for parameter value. The sender adapter will fail then for every message, with or without special characters.

Anyway, in this link (http://help.sap.com/saphelp_nwpi71/helpdata/EN/a4/f13341771b4c0de10000000a1550b0/frameset.htm) it seems to say that the sender soap adapter cannot be extended with modules, so maybe that's the reason why it fails when trying to add a module.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

But you can use the SOAP Adapter with Axis Framework Extension. This Adapter can be extended with SAP and customer-specific adapter modules.

For details about Axis Framework see here: http://help.sap.com/saphelp_nwpi71/helpdata/en/43/951aceb1146353e10000000a11466f/frameset.htm

Regards,

Volker

Answers (2)

Answers (2)

Former Member
0 Kudos

I made some further investigations and found the problem with some debugging tools like NetTool and TcpMon.

The SOAP adapter deals fine with all UTF-8 characters, and R3 was in fact sending all the special characters in UTF-8 encoding.

The problem was that R3 was calculating wrong the content-legth variable, which must travel as a header in the message. When converting a string to UTF-8, the special characters will fill 2 bytes instead of 1 byte. The original lenght of a string like "für" was 3 bytes (in ISO-8859) but it is 4 bytes in UTF-8. So R3 had to calculate correctly the lenght of the message after being converted to UTF-8.

former_member200962
Active Contributor
0 Kudos
If I use SoapUI to send the soap message, and setting UTF-8 as the encoding in the program options, it will go through fine. If I change to ISO-8859-1 it will fail.
I'm thinking in two options:

Check the use of option 1 ..... the URL which SAP is using to send the data can containe the encoding information.

Check this SAP note: https://service.sap.com/sap/support/notes/856597

From the above note:
Q: What character encoding is supported by the SOAP sender adapter?
+you can supply the encoding information with the xmlenc variable in the request URL as in+

Regards,

Abhishek.