Skip to Content
author's profile photo Former Member
Former Member

Special characters in sender soap adapter provoke HTTP 500 error

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2009 at 06:56 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 05, 2009 at 01:50 PM
    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 02:10 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.